diff --git a/ChangeLog b/ChangeLog index a165cb5213..a0524f239d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +1999-03-25 Michael Natterer + + * unitrc: corrected a typo + + * app/commands.c + * app/global_edit.c + * app/gradient.c + * app/interface.[ch] + * app/palette.c + * app/paths_dialog.c: the query_[string|..]_boxes connect their + close callback to a user provided signal now. + + * libgimp/gimpimage.c: gimp_image_get_unit() doesn't need a + g_return_if_fail() + + * libgimp/gimpunitmenu.c: memory leak & compiler warning + + * configure.in + * gimprc.in + * user_install + * user_install.bat + * plug-ins/Makefile.am + * plug-ins/FractalExplorer/*: added the FractalExplorer plugin. + + * app/install.c: ditto and made the install help text more + editable by moving it to an array. + Thu Mar 25 22:44:36 GMT 1999 Andy Thomas Ok. I'll add the file this time.. @@ -212,7 +239,7 @@ Tue Mar 16 19:12:08 CET 1999 Marc Lehmann * app/gdisplay.h: double the length of the cursor_format_str as users may define strange units now - + * app/xcf.c: forgot a sanity check when loading/saving the user unit property @@ -220,7 +247,7 @@ Tue Mar 16 19:12:08 CET 1999 Marc Lehmann This implements the rest of the unit system (unitrc loading and saving and full PDB interface) - + * Makefile.am * gimp.1 * user_install diff --git a/app/actions/help-commands.c b/app/actions/help-commands.c index 1943bd5a6a..b26f7a0796 100644 --- a/app/actions/help-commands.c +++ b/app/actions/help-commands.c @@ -368,13 +368,13 @@ select_border_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Border Selection"), - N_("Border selection by:"), + query_size_box (_("Border Selection"), + _("Border selection by:"), gimage_mask_border_radius, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_border_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_border_callback, gdisp->gimage); } void @@ -385,13 +385,13 @@ select_feather_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Feather Selection"), - N_("Feather selection by:"), + query_size_box (_("Feather Selection"), + _("Feather selection by:"), gimage_mask_feather_radius, 0, 32767, 3, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_feather_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_feather_callback, gdisp->gimage); } void @@ -407,8 +407,8 @@ select_grow_cmd_callback (GtkWidget *widget, gimage_mask_grow_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_grow_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_grow_callback, gdisp->gimage); } void @@ -424,8 +424,8 @@ select_shrink_cmd_callback (GtkWidget *widget, gimage_mask_shrink_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_shrink_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_shrink_callback, gdisp->gimage); } void diff --git a/app/commands.c b/app/commands.c index 1943bd5a6a..b26f7a0796 100644 --- a/app/commands.c +++ b/app/commands.c @@ -368,13 +368,13 @@ select_border_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Border Selection"), - N_("Border selection by:"), + query_size_box (_("Border Selection"), + _("Border selection by:"), gimage_mask_border_radius, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_border_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_border_callback, gdisp->gimage); } void @@ -385,13 +385,13 @@ select_feather_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Feather Selection"), - N_("Feather selection by:"), + query_size_box (_("Feather Selection"), + _("Feather selection by:"), gimage_mask_feather_radius, 0, 32767, 3, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_feather_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_feather_callback, gdisp->gimage); } void @@ -407,8 +407,8 @@ select_grow_cmd_callback (GtkWidget *widget, gimage_mask_grow_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_grow_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_grow_callback, gdisp->gimage); } void @@ -424,8 +424,8 @@ select_shrink_cmd_callback (GtkWidget *widget, gimage_mask_shrink_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_shrink_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_shrink_callback, gdisp->gimage); } void diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c index e76216ffcc..6c0441bb85 100644 --- a/app/core/gimp-edit.c +++ b/app/core/gimp-edit.c @@ -696,9 +696,10 @@ named_edit_cut (void *gdisp_ptr) gdisp = (GDisplay *) gdisp_ptr; active_tool_control (HALT, gdisp_ptr); - query_string_box (N_("Cut Named"), - N_("Enter a name for this buffer"), - NULL, GTK_OBJECT (gdisp->gimage), + query_string_box (_("Cut Named"), + _("Enter a name for this buffer"), + NULL, + GTK_OBJECT (gdisp->gimage), "destroy", cut_named_buffer_callback, gdisp); return TRUE; } @@ -727,9 +728,10 @@ named_edit_copy (void *gdisp_ptr) gdisp = (GDisplay *) gdisp_ptr; - query_string_box (N_("Copy Named"), - N_("Enter a name for this buffer"), - NULL, GTK_OBJECT (gdisp->gimage), + query_string_box (_("Copy Named"), + _("Enter a name for this buffer"), + NULL, + GTK_OBJECT (gdisp->gimage), "destroy", copy_named_buffer_callback, gdisp); return TRUE; } diff --git a/app/core/gimpedit.c b/app/core/gimpedit.c index e76216ffcc..6c0441bb85 100644 --- a/app/core/gimpedit.c +++ b/app/core/gimpedit.c @@ -696,9 +696,10 @@ named_edit_cut (void *gdisp_ptr) gdisp = (GDisplay *) gdisp_ptr; active_tool_control (HALT, gdisp_ptr); - query_string_box (N_("Cut Named"), - N_("Enter a name for this buffer"), - NULL, GTK_OBJECT (gdisp->gimage), + query_string_box (_("Cut Named"), + _("Enter a name for this buffer"), + NULL, + GTK_OBJECT (gdisp->gimage), "destroy", cut_named_buffer_callback, gdisp); return TRUE; } @@ -727,9 +728,10 @@ named_edit_copy (void *gdisp_ptr) gdisp = (GDisplay *) gdisp_ptr; - query_string_box (N_("Copy Named"), - N_("Enter a name for this buffer"), - NULL, GTK_OBJECT (gdisp->gimage), + query_string_box (_("Copy Named"), + _("Enter a name for this buffer"), + NULL, + GTK_OBJECT (gdisp->gimage), "destroy", copy_named_buffer_callback, gdisp); return TRUE; } diff --git a/app/dialogs/user-install-dialog.c b/app/dialogs/user-install-dialog.c index 5c4b9bbc22..b2a93ac952 100644 --- a/app/dialogs/user-install-dialog.c +++ b/app/dialogs/user-install-dialog.c @@ -106,6 +106,138 @@ install_help (InstallCallback callback) GdkFont *font_strong; GdkFont *font_emphasis; GdkFont *font; + static const struct { + gint font; + char *text; + } help_lines[] = { + { 2, N_("The GIMP - GNU Image Manipulation Program\n\n") }, + { 1, N_("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n") }, + { 0, "\n" }, + + { 0, N_("This program is free software; you can redistribute it and/or modify\n") }, + { 0, N_("it under the terms of the GNU General Public License as published by\n") }, + { 0, N_("the Free Software Foundation; either version 2 of the License, or\n") }, + { 0, N_("(at your option) any later version.\n") }, + { 0, "\n" }, + { 0, N_("This program is distributed in the hope that it will be useful,\n") }, + { 0, N_("but WITHOUT ANY WARRANTY; without even the implied warranty of\n") }, + { 0, N_("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n") }, + { 0, N_("See the GNU General Public License for more details.\n") }, + { 0, "\n" }, + { 0, N_("You should have received a copy of the GNU General Public License\n") }, + { 0, N_("along with this program; if not, write to the Free Software\n") }, + { 0, N_("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n") }, + { 0, "\n\n" }, + + { 2, N_("Personal GIMP Installation\n\n") }, + { 0, N_("For a proper GIMP installation, a subdirectory called\n") }, + { 1, NULL }, /* will be replaced with gimp_directory() */ + { 0, N_(" needs to be created. This\n") }, + { 0, N_("subdirectory will contain a number of important files:\n\n") }, + + { 1, N_("gimprc\n") }, + { 0, N_("\t\tThe gimprc is used to store personal preferences\n") }, + { 0, N_("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n") }, + { 0, N_("\t\tPaths to search for brushes, palettes, gradients\n") }, + { 0, N_("\t\tpatterns, plug-ins and modules are also configured here.\n") }, + + { 1, N_("unitrc\n") }, + { 0, N_("\t\tThe unitrc is used to store your user units database.\n") }, + { 0, N_("\t\tYou can define additional units and use them just\n") }, + { 0, N_("\t\tlike you use the built-in units inches, millimeters,\n") }, + { 0, N_("\t\tpoints and picas. This file is overwritten each time\n") }, + { 0, N_("\t\tyou quit the GIMP.\n") }, + + { 1, N_("pluginrc\n") }, + { 0, N_("\t\tPlug-ins and extensions are external programs run by\n") }, + { 0, N_("\t\tthe GIMP which provide additional functionality.\n") }, + { 0, N_("\t\tThese programs are searched for at run-time and\n") }, + { 0, N_("\t\tinformation about their functionality and mod-times\n") }, + { 0, N_("\t\tis cached in this file. This file is intended to\n") }, + { 0, N_("\t\tbe GIMP-readable only, and should not be edited.\n") }, + + { 1, N_("brushes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined brushes. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp brushes installation when searching for\n") }, + { 0, N_("\t\tbrushes.\n") }, + + { 1, N_("gradients\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gradients. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp gradients installation when searching for\n") }, + { 0, N_("\t\tgradients.\n") }, + + { 1, N_("gfig\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined figures to be used by the gfig plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gfig installation\n") }, + { 0, N_("\t\twhen searching for gfig figures.\n") }, + + { 1, N_("gflares\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gflares to be used by the gflare plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gflares installation\n") }, + { 0, N_("\t\twhen searching for gflares.\n") }, + + { 1, N_("fractalexplorer\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined fractals to be used by the FractalExplorer plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp FractalExplorer installation\n") }, + { 0, N_("\t\twhen searching for fractals.\n") }, + + { 1, N_("palettes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined palettes. The default gimprc file\n") }, + { 0, N_("\t\tchecks only this subdirectory (not the system-wide\n") }, + { 0, N_("\t\tinstallation) when searching for palettes. During\n") }, + { 0, N_("\t\tinstallation, the system palettes will be copied\n") }, + { 0, N_("\t\there. This is done to allow modifications made to\n") }, + { 0, N_("\t\tpalettes during GIMP execution to persist across\n") }, + { 0, N_("\t\tsessions.\n") }, + + { 1, N_("patterns\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined patterns. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp patterns installation when searching for\n") }, + { 0, N_("\t\tpatterns.\n") }, + + { 1, N_("plug-ins\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser created, temporary, or otherwise non-system-\n") }, + { 0, N_("\t\tsupported plug-ins. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide GIMP plug-in directories when searching for\n") }, + { 0, N_("\t\tplug-ins.\n") }, + + { 1, N_("modules\n") }, + { 0, N_("\t\tThis subdirectory can be used to store user created,\n") }, + { 0, N_("\t\ttemporary, or otherwise non-system-supported DLL modules.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory\n") }, + { 0, N_("\t\tin addition to the system-wide GIMP module directory\n") }, + { 0, N_("\t\twhen searching for modules to load when initialising.\n") }, + + { 1, N_("scripts\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to store \n") }, + { 0, N_("\t\tuser created and installed scripts. The default gimprc\n") }, + { 0, N_("\t\tfile checks this subdirectory in addition to the system\n") }, + { 0, N_("\t\t-wide gimp scripts subdirectory when searching for scripts\n") }, + + { 1, N_("tmp\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to temporarily\n") }, + { 0, N_("\t\tstore undo buffers to reduce memory usage. If GIMP is\n") }, + { 0, N_("\t\tunceremoniously killed, files may persist in this directory\n") }, + { 0, N_("\t\tof the form: gimp<#>.<#>. These files are useless across\n") }, + { 0, N_("\t\tGIMP sessions and can be destroyed with impunity.\n") } + }; + gint nhelp_lines = sizeof (help_lines) / sizeof (help_lines[0]); + gint i; help_widget = gtk_dialog_new (); gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", @@ -147,213 +279,20 @@ install_help (InstallCallback callback) /* Realize the widget before allowing new text to be inserted */ gtk_widget_realize (text); - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("The GIMP - GNU Image Manipulation Program\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is free software; you can redistribute it and/or modify\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("it under the terms of the GNU General Public License as published by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("the Free Software Foundation; either version 2 of the License, or\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("(at your option) any later version.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is distributed in the hope that it will be useful,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("See the GNU General Public License for more details.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("You should have received a copy of the GNU General Public License\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("along with this program; if not, write to the Free Software\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n\n", -1); - - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("Personal GIMP Installation\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("For a proper GIMP installation, a subdirectory called\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - gimp_directory (), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _(" needs to be created. This\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("subdirectory will contain a number of important files:\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe gimprc is used to store personal preferences\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPaths to search for brushes, palettes, gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("unitrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe unitrc is used to store your user units database.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tYou can define additional units and use them just\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tlike you use the built-in units inches, millimeters,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpoints and picas. This file is overwritten each time\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tyou quit the GIMP.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("pluginrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPlug-ins and extensions are external programs run by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tthe GIMP which provide additional functionality.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThese programs are searched for at run-time and\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinformation about their functionality and mod-times\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tis cached in this file. This file is intended to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbe GIMP-readable only, and should not be edited.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("brushes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined brushes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp brushes installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbrushes.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gradients. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp gradients installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tgradients.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gfig\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined figures to be used by the gfig plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gfig installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gfig figures.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gflares\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gflares to be used by the gflare plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gflares installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gflares.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("palettes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined palettes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks only this subdirectory (not the system-wide\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation) when searching for palettes. During\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation, the system palettes will be copied\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\there. This is done to allow modifications made to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpalettes during GIMP execution to persist across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsessions.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("patterns\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined patterns. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp patterns installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("plug-ins\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created, temporary, or otherwise non-system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsupported plug-ins. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide GIMP plug-in directories when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tplug-ins.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("modules\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory can be used to store user created,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tin addition to the system-wide GIMP module directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for modules to load when initialising.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to store \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created and installed scripts. The default gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tfile checks this subdirectory in addition to the system\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\t-wide gimp scripts subdirectory when searching for scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("tmp\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to temporarily\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tstore undo buffers to reduce memory usage. If GIMP is\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tunceremoniously killed, files may persist in this directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tof the form: gimp<#>.<#>. These files are useless across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1); + for (i = 0; i < nhelp_lines; i++) + if (help_lines[i].text == NULL) + /* inserting gimp_directory () this way is a little ugly */ + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gimp_directory (), -1); + else + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gettext (help_lines[i].text), -1); /* scroll back to the top */ gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0); diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c index 324f6e869b..8eaf50abbe 100644 --- a/app/display/gimpdisplayshell-draw.c +++ b/app/display/gimpdisplayshell-draw.c @@ -809,8 +809,8 @@ struct _QueryBox gpointer data; }; -static QueryBox * create_query_box (char *, char *, GtkObject *, QueryFunc, - gpointer); +static QueryBox * create_query_box (gchar *, gchar *, GtkObject *, gchar *, + QueryFunc, gpointer); static gint query_box_delete_callback (GtkWidget *, GdkEvent *, gpointer); static void query_box_cancel_callback (GtkWidget *, gpointer); static void string_query_box_ok_callback (GtkWidget *, gpointer); @@ -822,9 +822,10 @@ static void size_query_box_ok_callback (GtkWidget *, gpointer); */ QueryBox * -create_query_box (char *title, - char *message, +create_query_box (gchar *title, + gchar *message, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -845,11 +846,10 @@ create_query_box (char *title, (GtkSignalFunc) query_box_delete_callback, query_box); - /* if we are associated with an object, connect to that object's - * "destroy" signal + /* if we are associated with an object, connect to the provided signal */ - if (object && GTK_IS_OBJECT (object)) - gtk_signal_connect (GTK_OBJECT (object), "destroy", + if (object && GTK_IS_OBJECT (object) && signal) + gtk_signal_connect (GTK_OBJECT (object), signal, (GtkSignalFunc) query_box_cancel_callback, query_box); else @@ -894,17 +894,18 @@ create_query_box (char *title, } GtkWidget * -query_string_box (char *title, - char *message, - char *initial, +query_string_box (gchar *title, + gchar *message, + gchar *initial, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { QueryBox *query_box; GtkWidget *entry; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) string_query_box_ok_callback, @@ -925,12 +926,13 @@ query_string_box (char *title, } GtkWidget * -query_int_box (char *title, - char *message, - int initial, - int lower, - int upper, +query_int_box (gchar *title, + gchar *message, + gint initial, + gint lower, + gint upper, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -938,7 +940,7 @@ query_int_box (char *title, GtkAdjustment* adjustment; GtkWidget *spinbutton; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) int_query_box_ok_callback, @@ -959,13 +961,14 @@ query_int_box (char *title, } GtkWidget * -query_float_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +query_float_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -973,7 +976,7 @@ query_float_box (char *title, GtkAdjustment* adjustment; GtkWidget *spinbutton; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) float_query_box_ok_callback, @@ -994,22 +997,23 @@ query_float_box (char *title, } GtkWidget * -query_size_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +query_size_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GUnit unit, - float resolution, + gfloat resolution, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { QueryBox *query_box; GtkWidget *sizeentry; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) size_query_box_ok_callback, @@ -1054,7 +1058,7 @@ query_box_cancel_callback (GtkWidget *w, query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); @@ -1069,11 +1073,11 @@ string_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - char *string; + gchar *string; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); @@ -1094,18 +1098,18 @@ int_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - int *integer_value; + gint *integer_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the spinbutton data */ - integer_value = g_malloc(sizeof(int)); + integer_value = g_malloc (sizeof (gint)); *integer_value = - gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(query_box->entry)); + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(query_box->entry)); /* Call the user defined callback */ (* query_box->callback) (w, query_box->data, (gpointer) integer_value); @@ -1121,16 +1125,16 @@ float_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - float *float_value; + gfloat *float_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the spinbutton data */ - float_value = g_malloc(sizeof(float)); + float_value = g_malloc (sizeof (gfloat)); *float_value = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(query_box->entry)); @@ -1148,16 +1152,16 @@ size_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - float *float_value; + gfloat *float_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the sizeentry data */ - float_value = g_malloc(sizeof(float)); + float_value = g_malloc (sizeof (gfloat)); *float_value = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (query_box->entry), 0); diff --git a/app/display/gimpdisplayshell-draw.h b/app/display/gimpdisplayshell-draw.h index 3992c709c7..5679f4c4c0 100644 --- a/app/display/gimpdisplayshell-draw.h +++ b/app/display/gimpdisplayshell-draw.h @@ -58,41 +58,45 @@ void create_display_shell (GDisplay *gdisp, */ /* some simple query dialogs - * if object != NULL then the query boxes will connect to the "destroy" - * signal of this object + * if object != NULL then the query boxes will connect their cancel callback + * to the provided signal of this object */ -GtkWidget * query_string_box (char *title, - char *message, - char *initial, +GtkWidget * query_string_box (gchar *title, + gchar *message, + gchar *initial, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_int_box (char *title, +GtkWidget * query_int_box (gchar *title, char *message, - int initial, - int lower, - int upper, + gint initial, + gint lower, + gint upper, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_float_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +GtkWidget * query_float_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_size_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +GtkWidget * query_size_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GUnit unit, - float resolution, + gfloat resolution, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index 324f6e869b..8eaf50abbe 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -809,8 +809,8 @@ struct _QueryBox gpointer data; }; -static QueryBox * create_query_box (char *, char *, GtkObject *, QueryFunc, - gpointer); +static QueryBox * create_query_box (gchar *, gchar *, GtkObject *, gchar *, + QueryFunc, gpointer); static gint query_box_delete_callback (GtkWidget *, GdkEvent *, gpointer); static void query_box_cancel_callback (GtkWidget *, gpointer); static void string_query_box_ok_callback (GtkWidget *, gpointer); @@ -822,9 +822,10 @@ static void size_query_box_ok_callback (GtkWidget *, gpointer); */ QueryBox * -create_query_box (char *title, - char *message, +create_query_box (gchar *title, + gchar *message, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -845,11 +846,10 @@ create_query_box (char *title, (GtkSignalFunc) query_box_delete_callback, query_box); - /* if we are associated with an object, connect to that object's - * "destroy" signal + /* if we are associated with an object, connect to the provided signal */ - if (object && GTK_IS_OBJECT (object)) - gtk_signal_connect (GTK_OBJECT (object), "destroy", + if (object && GTK_IS_OBJECT (object) && signal) + gtk_signal_connect (GTK_OBJECT (object), signal, (GtkSignalFunc) query_box_cancel_callback, query_box); else @@ -894,17 +894,18 @@ create_query_box (char *title, } GtkWidget * -query_string_box (char *title, - char *message, - char *initial, +query_string_box (gchar *title, + gchar *message, + gchar *initial, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { QueryBox *query_box; GtkWidget *entry; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) string_query_box_ok_callback, @@ -925,12 +926,13 @@ query_string_box (char *title, } GtkWidget * -query_int_box (char *title, - char *message, - int initial, - int lower, - int upper, +query_int_box (gchar *title, + gchar *message, + gint initial, + gint lower, + gint upper, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -938,7 +940,7 @@ query_int_box (char *title, GtkAdjustment* adjustment; GtkWidget *spinbutton; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) int_query_box_ok_callback, @@ -959,13 +961,14 @@ query_int_box (char *title, } GtkWidget * -query_float_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +query_float_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -973,7 +976,7 @@ query_float_box (char *title, GtkAdjustment* adjustment; GtkWidget *spinbutton; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) float_query_box_ok_callback, @@ -994,22 +997,23 @@ query_float_box (char *title, } GtkWidget * -query_size_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +query_size_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GUnit unit, - float resolution, + gfloat resolution, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { QueryBox *query_box; GtkWidget *sizeentry; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) size_query_box_ok_callback, @@ -1054,7 +1058,7 @@ query_box_cancel_callback (GtkWidget *w, query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); @@ -1069,11 +1073,11 @@ string_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - char *string; + gchar *string; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); @@ -1094,18 +1098,18 @@ int_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - int *integer_value; + gint *integer_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the spinbutton data */ - integer_value = g_malloc(sizeof(int)); + integer_value = g_malloc (sizeof (gint)); *integer_value = - gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(query_box->entry)); + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(query_box->entry)); /* Call the user defined callback */ (* query_box->callback) (w, query_box->data, (gpointer) integer_value); @@ -1121,16 +1125,16 @@ float_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - float *float_value; + gfloat *float_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the spinbutton data */ - float_value = g_malloc(sizeof(float)); + float_value = g_malloc (sizeof (gfloat)); *float_value = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(query_box->entry)); @@ -1148,16 +1152,16 @@ size_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - float *float_value; + gfloat *float_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the sizeentry data */ - float_value = g_malloc(sizeof(float)); + float_value = g_malloc (sizeof (gfloat)); *float_value = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (query_box->entry), 0); diff --git a/app/display/gimpdisplayshell.h b/app/display/gimpdisplayshell.h index 3992c709c7..5679f4c4c0 100644 --- a/app/display/gimpdisplayshell.h +++ b/app/display/gimpdisplayshell.h @@ -58,41 +58,45 @@ void create_display_shell (GDisplay *gdisp, */ /* some simple query dialogs - * if object != NULL then the query boxes will connect to the "destroy" - * signal of this object + * if object != NULL then the query boxes will connect their cancel callback + * to the provided signal of this object */ -GtkWidget * query_string_box (char *title, - char *message, - char *initial, +GtkWidget * query_string_box (gchar *title, + gchar *message, + gchar *initial, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_int_box (char *title, +GtkWidget * query_int_box (gchar *title, char *message, - int initial, - int lower, - int upper, + gint initial, + gint lower, + gint upper, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_float_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +GtkWidget * query_float_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_size_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +GtkWidget * query_size_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GUnit unit, - float resolution, + gfloat resolution, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); diff --git a/app/global_edit.c b/app/global_edit.c index e76216ffcc..6c0441bb85 100644 --- a/app/global_edit.c +++ b/app/global_edit.c @@ -696,9 +696,10 @@ named_edit_cut (void *gdisp_ptr) gdisp = (GDisplay *) gdisp_ptr; active_tool_control (HALT, gdisp_ptr); - query_string_box (N_("Cut Named"), - N_("Enter a name for this buffer"), - NULL, GTK_OBJECT (gdisp->gimage), + query_string_box (_("Cut Named"), + _("Enter a name for this buffer"), + NULL, + GTK_OBJECT (gdisp->gimage), "destroy", cut_named_buffer_callback, gdisp); return TRUE; } @@ -727,9 +728,10 @@ named_edit_copy (void *gdisp_ptr) gdisp = (GDisplay *) gdisp_ptr; - query_string_box (N_("Copy Named"), - N_("Enter a name for this buffer"), - NULL, GTK_OBJECT (gdisp->gimage), + query_string_box (_("Copy Named"), + _("Enter a name for this buffer"), + NULL, + GTK_OBJECT (gdisp->gimage), "destroy", copy_named_buffer_callback, gdisp); return TRUE; } diff --git a/app/gradient.c b/app/gradient.c index 1f7edddb68..fecbfb297b 100644 --- a/app/gradient.c +++ b/app/gradient.c @@ -1256,10 +1256,11 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) static void ed_new_gradient_callback(GtkWidget *widget, gpointer client_data) { - query_string_box(N_("New gradient"), - N_("Enter a name for the new gradient"), - N_("untitled"), - NULL, ed_do_new_gradient_callback, NULL); + query_string_box(_("New gradient"), + _("Enter a name for the new gradient"), + _("untitled"), + NULL, NULL, + ed_do_new_gradient_callback, NULL); } /* ed_new_gradient_callback */ @@ -1365,10 +1366,11 @@ ed_copy_gradient_callback(GtkWidget *widget, gpointer client_data) name = g_strdup_printf(_("%s copy"), curr_gradient->name); - query_string_box(N_("Copy gradient"), - N_("Enter a name for the copied gradient"), + query_string_box(_("Copy gradient"), + _("Enter a name for the copied gradient"), name, - NULL, ed_do_copy_gradient_callback, NULL); + NULL, NULL, + ed_do_copy_gradient_callback, NULL); g_free(name); } /* ed_copy_gradient_callback */ @@ -1594,10 +1596,11 @@ ed_rename_grads_callback(GtkWidget *widget, gpointer client_data) if(curr_gradient == NULL) return; - query_string_box(N_("Rename gradient"), - N_("Enter a new name for the gradient"), + query_string_box(_("Rename gradient"), + _("Enter a new name for the gradient"), curr_gradient->name, - NULL, ed_do_rename_gradient_callback, curr_gradient); + NULL, NULL, + ed_do_rename_gradient_callback, curr_gradient); } /*****/ @@ -2246,16 +2249,16 @@ control_do_hint(gint x, gint y) case GRAD_DRAG_LEFT: if (seg != NULL) { if (seg->prev != NULL) - ed_set_hint(N_("Drag: move Shift+drag: move & compress")); + ed_set_hint(_("Drag: move Shift+drag: move & compress")); else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); } else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); break; case GRAD_DRAG_MIDDLE: - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move")); break; @@ -2266,7 +2269,7 @@ control_do_hint(gint x, gint y) break; } /* switch */ } else - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move Shift+drag: move & compress")); } /* control_do_hint */ diff --git a/app/gradient_editor.c b/app/gradient_editor.c index 1f7edddb68..fecbfb297b 100644 --- a/app/gradient_editor.c +++ b/app/gradient_editor.c @@ -1256,10 +1256,11 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) static void ed_new_gradient_callback(GtkWidget *widget, gpointer client_data) { - query_string_box(N_("New gradient"), - N_("Enter a name for the new gradient"), - N_("untitled"), - NULL, ed_do_new_gradient_callback, NULL); + query_string_box(_("New gradient"), + _("Enter a name for the new gradient"), + _("untitled"), + NULL, NULL, + ed_do_new_gradient_callback, NULL); } /* ed_new_gradient_callback */ @@ -1365,10 +1366,11 @@ ed_copy_gradient_callback(GtkWidget *widget, gpointer client_data) name = g_strdup_printf(_("%s copy"), curr_gradient->name); - query_string_box(N_("Copy gradient"), - N_("Enter a name for the copied gradient"), + query_string_box(_("Copy gradient"), + _("Enter a name for the copied gradient"), name, - NULL, ed_do_copy_gradient_callback, NULL); + NULL, NULL, + ed_do_copy_gradient_callback, NULL); g_free(name); } /* ed_copy_gradient_callback */ @@ -1594,10 +1596,11 @@ ed_rename_grads_callback(GtkWidget *widget, gpointer client_data) if(curr_gradient == NULL) return; - query_string_box(N_("Rename gradient"), - N_("Enter a new name for the gradient"), + query_string_box(_("Rename gradient"), + _("Enter a new name for the gradient"), curr_gradient->name, - NULL, ed_do_rename_gradient_callback, curr_gradient); + NULL, NULL, + ed_do_rename_gradient_callback, curr_gradient); } /*****/ @@ -2246,16 +2249,16 @@ control_do_hint(gint x, gint y) case GRAD_DRAG_LEFT: if (seg != NULL) { if (seg->prev != NULL) - ed_set_hint(N_("Drag: move Shift+drag: move & compress")); + ed_set_hint(_("Drag: move Shift+drag: move & compress")); else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); } else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); break; case GRAD_DRAG_MIDDLE: - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move")); break; @@ -2266,7 +2269,7 @@ control_do_hint(gint x, gint y) break; } /* switch */ } else - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move Shift+drag: move & compress")); } /* control_do_hint */ diff --git a/app/gui/commands.c b/app/gui/commands.c index 1943bd5a6a..b26f7a0796 100644 --- a/app/gui/commands.c +++ b/app/gui/commands.c @@ -368,13 +368,13 @@ select_border_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Border Selection"), - N_("Border selection by:"), + query_size_box (_("Border Selection"), + _("Border selection by:"), gimage_mask_border_radius, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_border_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_border_callback, gdisp->gimage); } void @@ -385,13 +385,13 @@ select_feather_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Feather Selection"), - N_("Feather selection by:"), + query_size_box (_("Feather Selection"), + _("Feather selection by:"), gimage_mask_feather_radius, 0, 32767, 3, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_feather_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_feather_callback, gdisp->gimage); } void @@ -407,8 +407,8 @@ select_grow_cmd_callback (GtkWidget *widget, gimage_mask_grow_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_grow_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_grow_callback, gdisp->gimage); } void @@ -424,8 +424,8 @@ select_shrink_cmd_callback (GtkWidget *widget, gimage_mask_shrink_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_shrink_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_shrink_callback, gdisp->gimage); } void diff --git a/app/gui/gradient-editor.c b/app/gui/gradient-editor.c index 1f7edddb68..fecbfb297b 100644 --- a/app/gui/gradient-editor.c +++ b/app/gui/gradient-editor.c @@ -1256,10 +1256,11 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) static void ed_new_gradient_callback(GtkWidget *widget, gpointer client_data) { - query_string_box(N_("New gradient"), - N_("Enter a name for the new gradient"), - N_("untitled"), - NULL, ed_do_new_gradient_callback, NULL); + query_string_box(_("New gradient"), + _("Enter a name for the new gradient"), + _("untitled"), + NULL, NULL, + ed_do_new_gradient_callback, NULL); } /* ed_new_gradient_callback */ @@ -1365,10 +1366,11 @@ ed_copy_gradient_callback(GtkWidget *widget, gpointer client_data) name = g_strdup_printf(_("%s copy"), curr_gradient->name); - query_string_box(N_("Copy gradient"), - N_("Enter a name for the copied gradient"), + query_string_box(_("Copy gradient"), + _("Enter a name for the copied gradient"), name, - NULL, ed_do_copy_gradient_callback, NULL); + NULL, NULL, + ed_do_copy_gradient_callback, NULL); g_free(name); } /* ed_copy_gradient_callback */ @@ -1594,10 +1596,11 @@ ed_rename_grads_callback(GtkWidget *widget, gpointer client_data) if(curr_gradient == NULL) return; - query_string_box(N_("Rename gradient"), - N_("Enter a new name for the gradient"), + query_string_box(_("Rename gradient"), + _("Enter a new name for the gradient"), curr_gradient->name, - NULL, ed_do_rename_gradient_callback, curr_gradient); + NULL, NULL, + ed_do_rename_gradient_callback, curr_gradient); } /*****/ @@ -2246,16 +2249,16 @@ control_do_hint(gint x, gint y) case GRAD_DRAG_LEFT: if (seg != NULL) { if (seg->prev != NULL) - ed_set_hint(N_("Drag: move Shift+drag: move & compress")); + ed_set_hint(_("Drag: move Shift+drag: move & compress")); else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); } else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); break; case GRAD_DRAG_MIDDLE: - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move")); break; @@ -2266,7 +2269,7 @@ control_do_hint(gint x, gint y) break; } /* switch */ } else - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move Shift+drag: move & compress")); } /* control_do_hint */ diff --git a/app/gui/help-commands.c b/app/gui/help-commands.c index 1943bd5a6a..b26f7a0796 100644 --- a/app/gui/help-commands.c +++ b/app/gui/help-commands.c @@ -368,13 +368,13 @@ select_border_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Border Selection"), - N_("Border selection by:"), + query_size_box (_("Border Selection"), + _("Border selection by:"), gimage_mask_border_radius, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_border_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_border_callback, gdisp->gimage); } void @@ -385,13 +385,13 @@ select_feather_cmd_callback (GtkWidget *widget, gdisp = gdisplay_active (); - query_size_box (N_("Feather Selection"), - N_("Feather selection by:"), + query_size_box (_("Feather Selection"), + _("Feather selection by:"), gimage_mask_feather_radius, 0, 32767, 3, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_feather_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_feather_callback, gdisp->gimage); } void @@ -407,8 +407,8 @@ select_grow_cmd_callback (GtkWidget *widget, gimage_mask_grow_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_grow_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_grow_callback, gdisp->gimage); } void @@ -424,8 +424,8 @@ select_shrink_cmd_callback (GtkWidget *widget, gimage_mask_shrink_pixels, 1, 32767, 0, gdisp->dot_for_dot ? UNIT_PIXEL : gdisp->gimage->unit, MIN(gdisp->gimage->xresolution, gdisp->gimage->yresolution), - GTK_OBJECT (gdisp->gimage), gimage_mask_shrink_callback, - gdisp->gimage); + GTK_OBJECT (gdisp->gimage), "destroy", + gimage_mask_shrink_callback, gdisp->gimage); } void diff --git a/app/gui/palette-editor.c b/app/gui/palette-editor.c index 2a68c578a4..b35ea5d8bb 100644 --- a/app/gui/palette-editor.c +++ b/app/gui/palette-editor.c @@ -1348,8 +1348,11 @@ static void palette_new_entries_callback (GtkWidget *w, gpointer client_data) { - query_string_box (_("New Palette"), _("Enter a name for new palette"), - NULL, NULL, palette_add_entries_callback, client_data); + query_string_box (_("New Palette"), + _("Enter a name for new palette"), + NULL, + NULL, NULL, + palette_add_entries_callback, client_data); } static void @@ -2709,10 +2712,13 @@ palette_merge_entries_callback (GtkWidget *w, static void palette_merge_dialog_callback (GtkWidget *w, - gpointer client_data) + gpointer client_data) { - query_string_box (_("Merge Palette"), _("Enter a name for merged palette"), - NULL, NULL, palette_merge_entries_callback, client_data); + query_string_box (_("Merge Palette"), + _("Enter a name for merged palette"), + NULL, + NULL, NULL, + palette_merge_entries_callback, client_data); } static void @@ -2731,7 +2737,8 @@ palette_import_dialog_callback (GtkWidget *w, } static void -palette_import_fill_grad_preview(GtkWidget *preview,gradient_t *gradient) +palette_import_fill_grad_preview(GtkWidget *preview, + gradient_t *gradient) { guchar buffer[3*IMPORT_PREVIEW_WIDTH]; gint loop; diff --git a/app/gui/paths-dialog.c b/app/gui/paths-dialog.c index b87ad7ab18..1d57af1845 100644 --- a/app/gui/paths-dialog.c +++ b/app/gui/paths-dialog.c @@ -1053,10 +1053,11 @@ paths_dialog_edit_path_query(GtkWidget *widget) NULL, &mask); - query_string_box(N_("Rename path"), - N_("Enter a new name for the path"), + query_string_box(_("Rename path"), + _("Enter a new name for the path"), text, - NULL, do_rename_paths_callback, widget); + NULL, NULL, + do_rename_paths_callback, widget); } static gint diff --git a/app/gui/user-install-dialog.c b/app/gui/user-install-dialog.c index 5c4b9bbc22..b2a93ac952 100644 --- a/app/gui/user-install-dialog.c +++ b/app/gui/user-install-dialog.c @@ -106,6 +106,138 @@ install_help (InstallCallback callback) GdkFont *font_strong; GdkFont *font_emphasis; GdkFont *font; + static const struct { + gint font; + char *text; + } help_lines[] = { + { 2, N_("The GIMP - GNU Image Manipulation Program\n\n") }, + { 1, N_("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n") }, + { 0, "\n" }, + + { 0, N_("This program is free software; you can redistribute it and/or modify\n") }, + { 0, N_("it under the terms of the GNU General Public License as published by\n") }, + { 0, N_("the Free Software Foundation; either version 2 of the License, or\n") }, + { 0, N_("(at your option) any later version.\n") }, + { 0, "\n" }, + { 0, N_("This program is distributed in the hope that it will be useful,\n") }, + { 0, N_("but WITHOUT ANY WARRANTY; without even the implied warranty of\n") }, + { 0, N_("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n") }, + { 0, N_("See the GNU General Public License for more details.\n") }, + { 0, "\n" }, + { 0, N_("You should have received a copy of the GNU General Public License\n") }, + { 0, N_("along with this program; if not, write to the Free Software\n") }, + { 0, N_("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n") }, + { 0, "\n\n" }, + + { 2, N_("Personal GIMP Installation\n\n") }, + { 0, N_("For a proper GIMP installation, a subdirectory called\n") }, + { 1, NULL }, /* will be replaced with gimp_directory() */ + { 0, N_(" needs to be created. This\n") }, + { 0, N_("subdirectory will contain a number of important files:\n\n") }, + + { 1, N_("gimprc\n") }, + { 0, N_("\t\tThe gimprc is used to store personal preferences\n") }, + { 0, N_("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n") }, + { 0, N_("\t\tPaths to search for brushes, palettes, gradients\n") }, + { 0, N_("\t\tpatterns, plug-ins and modules are also configured here.\n") }, + + { 1, N_("unitrc\n") }, + { 0, N_("\t\tThe unitrc is used to store your user units database.\n") }, + { 0, N_("\t\tYou can define additional units and use them just\n") }, + { 0, N_("\t\tlike you use the built-in units inches, millimeters,\n") }, + { 0, N_("\t\tpoints and picas. This file is overwritten each time\n") }, + { 0, N_("\t\tyou quit the GIMP.\n") }, + + { 1, N_("pluginrc\n") }, + { 0, N_("\t\tPlug-ins and extensions are external programs run by\n") }, + { 0, N_("\t\tthe GIMP which provide additional functionality.\n") }, + { 0, N_("\t\tThese programs are searched for at run-time and\n") }, + { 0, N_("\t\tinformation about their functionality and mod-times\n") }, + { 0, N_("\t\tis cached in this file. This file is intended to\n") }, + { 0, N_("\t\tbe GIMP-readable only, and should not be edited.\n") }, + + { 1, N_("brushes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined brushes. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp brushes installation when searching for\n") }, + { 0, N_("\t\tbrushes.\n") }, + + { 1, N_("gradients\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gradients. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp gradients installation when searching for\n") }, + { 0, N_("\t\tgradients.\n") }, + + { 1, N_("gfig\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined figures to be used by the gfig plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gfig installation\n") }, + { 0, N_("\t\twhen searching for gfig figures.\n") }, + + { 1, N_("gflares\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gflares to be used by the gflare plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gflares installation\n") }, + { 0, N_("\t\twhen searching for gflares.\n") }, + + { 1, N_("fractalexplorer\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined fractals to be used by the FractalExplorer plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp FractalExplorer installation\n") }, + { 0, N_("\t\twhen searching for fractals.\n") }, + + { 1, N_("palettes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined palettes. The default gimprc file\n") }, + { 0, N_("\t\tchecks only this subdirectory (not the system-wide\n") }, + { 0, N_("\t\tinstallation) when searching for palettes. During\n") }, + { 0, N_("\t\tinstallation, the system palettes will be copied\n") }, + { 0, N_("\t\there. This is done to allow modifications made to\n") }, + { 0, N_("\t\tpalettes during GIMP execution to persist across\n") }, + { 0, N_("\t\tsessions.\n") }, + + { 1, N_("patterns\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined patterns. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp patterns installation when searching for\n") }, + { 0, N_("\t\tpatterns.\n") }, + + { 1, N_("plug-ins\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser created, temporary, or otherwise non-system-\n") }, + { 0, N_("\t\tsupported plug-ins. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide GIMP plug-in directories when searching for\n") }, + { 0, N_("\t\tplug-ins.\n") }, + + { 1, N_("modules\n") }, + { 0, N_("\t\tThis subdirectory can be used to store user created,\n") }, + { 0, N_("\t\ttemporary, or otherwise non-system-supported DLL modules.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory\n") }, + { 0, N_("\t\tin addition to the system-wide GIMP module directory\n") }, + { 0, N_("\t\twhen searching for modules to load when initialising.\n") }, + + { 1, N_("scripts\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to store \n") }, + { 0, N_("\t\tuser created and installed scripts. The default gimprc\n") }, + { 0, N_("\t\tfile checks this subdirectory in addition to the system\n") }, + { 0, N_("\t\t-wide gimp scripts subdirectory when searching for scripts\n") }, + + { 1, N_("tmp\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to temporarily\n") }, + { 0, N_("\t\tstore undo buffers to reduce memory usage. If GIMP is\n") }, + { 0, N_("\t\tunceremoniously killed, files may persist in this directory\n") }, + { 0, N_("\t\tof the form: gimp<#>.<#>. These files are useless across\n") }, + { 0, N_("\t\tGIMP sessions and can be destroyed with impunity.\n") } + }; + gint nhelp_lines = sizeof (help_lines) / sizeof (help_lines[0]); + gint i; help_widget = gtk_dialog_new (); gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", @@ -147,213 +279,20 @@ install_help (InstallCallback callback) /* Realize the widget before allowing new text to be inserted */ gtk_widget_realize (text); - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("The GIMP - GNU Image Manipulation Program\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is free software; you can redistribute it and/or modify\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("it under the terms of the GNU General Public License as published by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("the Free Software Foundation; either version 2 of the License, or\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("(at your option) any later version.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is distributed in the hope that it will be useful,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("See the GNU General Public License for more details.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("You should have received a copy of the GNU General Public License\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("along with this program; if not, write to the Free Software\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n\n", -1); - - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("Personal GIMP Installation\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("For a proper GIMP installation, a subdirectory called\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - gimp_directory (), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _(" needs to be created. This\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("subdirectory will contain a number of important files:\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe gimprc is used to store personal preferences\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPaths to search for brushes, palettes, gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("unitrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe unitrc is used to store your user units database.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tYou can define additional units and use them just\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tlike you use the built-in units inches, millimeters,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpoints and picas. This file is overwritten each time\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tyou quit the GIMP.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("pluginrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPlug-ins and extensions are external programs run by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tthe GIMP which provide additional functionality.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThese programs are searched for at run-time and\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinformation about their functionality and mod-times\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tis cached in this file. This file is intended to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbe GIMP-readable only, and should not be edited.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("brushes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined brushes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp brushes installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbrushes.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gradients. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp gradients installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tgradients.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gfig\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined figures to be used by the gfig plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gfig installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gfig figures.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gflares\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gflares to be used by the gflare plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gflares installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gflares.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("palettes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined palettes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks only this subdirectory (not the system-wide\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation) when searching for palettes. During\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation, the system palettes will be copied\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\there. This is done to allow modifications made to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpalettes during GIMP execution to persist across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsessions.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("patterns\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined patterns. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp patterns installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("plug-ins\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created, temporary, or otherwise non-system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsupported plug-ins. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide GIMP plug-in directories when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tplug-ins.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("modules\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory can be used to store user created,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tin addition to the system-wide GIMP module directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for modules to load when initialising.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to store \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created and installed scripts. The default gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tfile checks this subdirectory in addition to the system\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\t-wide gimp scripts subdirectory when searching for scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("tmp\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to temporarily\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tstore undo buffers to reduce memory usage. If GIMP is\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tunceremoniously killed, files may persist in this directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tof the form: gimp<#>.<#>. These files are useless across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1); + for (i = 0; i < nhelp_lines; i++) + if (help_lines[i].text == NULL) + /* inserting gimp_directory () this way is a little ugly */ + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gimp_directory (), -1); + else + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gettext (help_lines[i].text), -1); /* scroll back to the top */ gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0); diff --git a/app/install.c b/app/install.c index 5c4b9bbc22..b2a93ac952 100644 --- a/app/install.c +++ b/app/install.c @@ -106,6 +106,138 @@ install_help (InstallCallback callback) GdkFont *font_strong; GdkFont *font_emphasis; GdkFont *font; + static const struct { + gint font; + char *text; + } help_lines[] = { + { 2, N_("The GIMP - GNU Image Manipulation Program\n\n") }, + { 1, N_("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n") }, + { 0, "\n" }, + + { 0, N_("This program is free software; you can redistribute it and/or modify\n") }, + { 0, N_("it under the terms of the GNU General Public License as published by\n") }, + { 0, N_("the Free Software Foundation; either version 2 of the License, or\n") }, + { 0, N_("(at your option) any later version.\n") }, + { 0, "\n" }, + { 0, N_("This program is distributed in the hope that it will be useful,\n") }, + { 0, N_("but WITHOUT ANY WARRANTY; without even the implied warranty of\n") }, + { 0, N_("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n") }, + { 0, N_("See the GNU General Public License for more details.\n") }, + { 0, "\n" }, + { 0, N_("You should have received a copy of the GNU General Public License\n") }, + { 0, N_("along with this program; if not, write to the Free Software\n") }, + { 0, N_("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n") }, + { 0, "\n\n" }, + + { 2, N_("Personal GIMP Installation\n\n") }, + { 0, N_("For a proper GIMP installation, a subdirectory called\n") }, + { 1, NULL }, /* will be replaced with gimp_directory() */ + { 0, N_(" needs to be created. This\n") }, + { 0, N_("subdirectory will contain a number of important files:\n\n") }, + + { 1, N_("gimprc\n") }, + { 0, N_("\t\tThe gimprc is used to store personal preferences\n") }, + { 0, N_("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n") }, + { 0, N_("\t\tPaths to search for brushes, palettes, gradients\n") }, + { 0, N_("\t\tpatterns, plug-ins and modules are also configured here.\n") }, + + { 1, N_("unitrc\n") }, + { 0, N_("\t\tThe unitrc is used to store your user units database.\n") }, + { 0, N_("\t\tYou can define additional units and use them just\n") }, + { 0, N_("\t\tlike you use the built-in units inches, millimeters,\n") }, + { 0, N_("\t\tpoints and picas. This file is overwritten each time\n") }, + { 0, N_("\t\tyou quit the GIMP.\n") }, + + { 1, N_("pluginrc\n") }, + { 0, N_("\t\tPlug-ins and extensions are external programs run by\n") }, + { 0, N_("\t\tthe GIMP which provide additional functionality.\n") }, + { 0, N_("\t\tThese programs are searched for at run-time and\n") }, + { 0, N_("\t\tinformation about their functionality and mod-times\n") }, + { 0, N_("\t\tis cached in this file. This file is intended to\n") }, + { 0, N_("\t\tbe GIMP-readable only, and should not be edited.\n") }, + + { 1, N_("brushes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined brushes. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp brushes installation when searching for\n") }, + { 0, N_("\t\tbrushes.\n") }, + + { 1, N_("gradients\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gradients. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp gradients installation when searching for\n") }, + { 0, N_("\t\tgradients.\n") }, + + { 1, N_("gfig\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined figures to be used by the gfig plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gfig installation\n") }, + { 0, N_("\t\twhen searching for gfig figures.\n") }, + + { 1, N_("gflares\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gflares to be used by the gflare plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gflares installation\n") }, + { 0, N_("\t\twhen searching for gflares.\n") }, + + { 1, N_("fractalexplorer\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined fractals to be used by the FractalExplorer plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp FractalExplorer installation\n") }, + { 0, N_("\t\twhen searching for fractals.\n") }, + + { 1, N_("palettes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined palettes. The default gimprc file\n") }, + { 0, N_("\t\tchecks only this subdirectory (not the system-wide\n") }, + { 0, N_("\t\tinstallation) when searching for palettes. During\n") }, + { 0, N_("\t\tinstallation, the system palettes will be copied\n") }, + { 0, N_("\t\there. This is done to allow modifications made to\n") }, + { 0, N_("\t\tpalettes during GIMP execution to persist across\n") }, + { 0, N_("\t\tsessions.\n") }, + + { 1, N_("patterns\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined patterns. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp patterns installation when searching for\n") }, + { 0, N_("\t\tpatterns.\n") }, + + { 1, N_("plug-ins\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser created, temporary, or otherwise non-system-\n") }, + { 0, N_("\t\tsupported plug-ins. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide GIMP plug-in directories when searching for\n") }, + { 0, N_("\t\tplug-ins.\n") }, + + { 1, N_("modules\n") }, + { 0, N_("\t\tThis subdirectory can be used to store user created,\n") }, + { 0, N_("\t\ttemporary, or otherwise non-system-supported DLL modules.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory\n") }, + { 0, N_("\t\tin addition to the system-wide GIMP module directory\n") }, + { 0, N_("\t\twhen searching for modules to load when initialising.\n") }, + + { 1, N_("scripts\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to store \n") }, + { 0, N_("\t\tuser created and installed scripts. The default gimprc\n") }, + { 0, N_("\t\tfile checks this subdirectory in addition to the system\n") }, + { 0, N_("\t\t-wide gimp scripts subdirectory when searching for scripts\n") }, + + { 1, N_("tmp\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to temporarily\n") }, + { 0, N_("\t\tstore undo buffers to reduce memory usage. If GIMP is\n") }, + { 0, N_("\t\tunceremoniously killed, files may persist in this directory\n") }, + { 0, N_("\t\tof the form: gimp<#>.<#>. These files are useless across\n") }, + { 0, N_("\t\tGIMP sessions and can be destroyed with impunity.\n") } + }; + gint nhelp_lines = sizeof (help_lines) / sizeof (help_lines[0]); + gint i; help_widget = gtk_dialog_new (); gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", @@ -147,213 +279,20 @@ install_help (InstallCallback callback) /* Realize the widget before allowing new text to be inserted */ gtk_widget_realize (text); - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("The GIMP - GNU Image Manipulation Program\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is free software; you can redistribute it and/or modify\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("it under the terms of the GNU General Public License as published by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("the Free Software Foundation; either version 2 of the License, or\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("(at your option) any later version.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is distributed in the hope that it will be useful,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("See the GNU General Public License for more details.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("You should have received a copy of the GNU General Public License\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("along with this program; if not, write to the Free Software\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n\n", -1); - - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("Personal GIMP Installation\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("For a proper GIMP installation, a subdirectory called\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - gimp_directory (), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _(" needs to be created. This\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("subdirectory will contain a number of important files:\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe gimprc is used to store personal preferences\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPaths to search for brushes, palettes, gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("unitrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe unitrc is used to store your user units database.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tYou can define additional units and use them just\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tlike you use the built-in units inches, millimeters,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpoints and picas. This file is overwritten each time\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tyou quit the GIMP.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("pluginrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPlug-ins and extensions are external programs run by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tthe GIMP which provide additional functionality.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThese programs are searched for at run-time and\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinformation about their functionality and mod-times\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tis cached in this file. This file is intended to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbe GIMP-readable only, and should not be edited.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("brushes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined brushes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp brushes installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbrushes.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gradients. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp gradients installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tgradients.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gfig\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined figures to be used by the gfig plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gfig installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gfig figures.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gflares\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gflares to be used by the gflare plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gflares installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gflares.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("palettes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined palettes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks only this subdirectory (not the system-wide\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation) when searching for palettes. During\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation, the system palettes will be copied\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\there. This is done to allow modifications made to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpalettes during GIMP execution to persist across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsessions.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("patterns\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined patterns. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp patterns installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("plug-ins\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created, temporary, or otherwise non-system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsupported plug-ins. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide GIMP plug-in directories when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tplug-ins.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("modules\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory can be used to store user created,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tin addition to the system-wide GIMP module directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for modules to load when initialising.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to store \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created and installed scripts. The default gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tfile checks this subdirectory in addition to the system\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\t-wide gimp scripts subdirectory when searching for scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("tmp\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to temporarily\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tstore undo buffers to reduce memory usage. If GIMP is\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tunceremoniously killed, files may persist in this directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tof the form: gimp<#>.<#>. These files are useless across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1); + for (i = 0; i < nhelp_lines; i++) + if (help_lines[i].text == NULL) + /* inserting gimp_directory () this way is a little ugly */ + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gimp_directory (), -1); + else + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gettext (help_lines[i].text), -1); /* scroll back to the top */ gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0); diff --git a/app/interface.c b/app/interface.c index 324f6e869b..8eaf50abbe 100644 --- a/app/interface.c +++ b/app/interface.c @@ -809,8 +809,8 @@ struct _QueryBox gpointer data; }; -static QueryBox * create_query_box (char *, char *, GtkObject *, QueryFunc, - gpointer); +static QueryBox * create_query_box (gchar *, gchar *, GtkObject *, gchar *, + QueryFunc, gpointer); static gint query_box_delete_callback (GtkWidget *, GdkEvent *, gpointer); static void query_box_cancel_callback (GtkWidget *, gpointer); static void string_query_box_ok_callback (GtkWidget *, gpointer); @@ -822,9 +822,10 @@ static void size_query_box_ok_callback (GtkWidget *, gpointer); */ QueryBox * -create_query_box (char *title, - char *message, +create_query_box (gchar *title, + gchar *message, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -845,11 +846,10 @@ create_query_box (char *title, (GtkSignalFunc) query_box_delete_callback, query_box); - /* if we are associated with an object, connect to that object's - * "destroy" signal + /* if we are associated with an object, connect to the provided signal */ - if (object && GTK_IS_OBJECT (object)) - gtk_signal_connect (GTK_OBJECT (object), "destroy", + if (object && GTK_IS_OBJECT (object) && signal) + gtk_signal_connect (GTK_OBJECT (object), signal, (GtkSignalFunc) query_box_cancel_callback, query_box); else @@ -894,17 +894,18 @@ create_query_box (char *title, } GtkWidget * -query_string_box (char *title, - char *message, - char *initial, +query_string_box (gchar *title, + gchar *message, + gchar *initial, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { QueryBox *query_box; GtkWidget *entry; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) string_query_box_ok_callback, @@ -925,12 +926,13 @@ query_string_box (char *title, } GtkWidget * -query_int_box (char *title, - char *message, - int initial, - int lower, - int upper, +query_int_box (gchar *title, + gchar *message, + gint initial, + gint lower, + gint upper, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -938,7 +940,7 @@ query_int_box (char *title, GtkAdjustment* adjustment; GtkWidget *spinbutton; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) int_query_box_ok_callback, @@ -959,13 +961,14 @@ query_int_box (char *title, } GtkWidget * -query_float_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +query_float_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { @@ -973,7 +976,7 @@ query_float_box (char *title, GtkAdjustment* adjustment; GtkWidget *spinbutton; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) float_query_box_ok_callback, @@ -994,22 +997,23 @@ query_float_box (char *title, } GtkWidget * -query_size_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +query_size_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GUnit unit, - float resolution, + gfloat resolution, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data) { QueryBox *query_box; GtkWidget *sizeentry; - query_box = create_query_box (title, message, object, callback, data); + query_box = create_query_box (title, message, object, signal, callback, data); gtk_signal_connect (GTK_OBJECT (query_box->ok_button), "clicked", (GtkSignalFunc) size_query_box_ok_callback, @@ -1054,7 +1058,7 @@ query_box_cancel_callback (GtkWidget *w, query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); @@ -1069,11 +1073,11 @@ string_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - char *string; + gchar *string; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); @@ -1094,18 +1098,18 @@ int_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - int *integer_value; + gint *integer_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the spinbutton data */ - integer_value = g_malloc(sizeof(int)); + integer_value = g_malloc (sizeof (gint)); *integer_value = - gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(query_box->entry)); + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(query_box->entry)); /* Call the user defined callback */ (* query_box->callback) (w, query_box->data, (gpointer) integer_value); @@ -1121,16 +1125,16 @@ float_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - float *float_value; + gfloat *float_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the spinbutton data */ - float_value = g_malloc(sizeof(float)); + float_value = g_malloc (sizeof (gfloat)); *float_value = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(query_box->entry)); @@ -1148,16 +1152,16 @@ size_query_box_ok_callback (GtkWidget *w, gpointer client_data) { QueryBox *query_box; - float *float_value; + gfloat *float_value; query_box = (QueryBox *) client_data; - /* disconnect, if we are connected to some object's "destroy" signal */ + /* disconnect, if we are connected to some signal */ if (query_box->object) gtk_signal_disconnect_by_data (query_box->object, query_box); /* Get the sizeentry data */ - float_value = g_malloc(sizeof(float)); + float_value = g_malloc (sizeof (gfloat)); *float_value = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (query_box->entry), 0); diff --git a/app/interface.h b/app/interface.h index 3992c709c7..5679f4c4c0 100644 --- a/app/interface.h +++ b/app/interface.h @@ -58,41 +58,45 @@ void create_display_shell (GDisplay *gdisp, */ /* some simple query dialogs - * if object != NULL then the query boxes will connect to the "destroy" - * signal of this object + * if object != NULL then the query boxes will connect their cancel callback + * to the provided signal of this object */ -GtkWidget * query_string_box (char *title, - char *message, - char *initial, +GtkWidget * query_string_box (gchar *title, + gchar *message, + gchar *initial, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_int_box (char *title, +GtkWidget * query_int_box (gchar *title, char *message, - int initial, - int lower, - int upper, + gint initial, + gint lower, + gint upper, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_float_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +GtkWidget * query_float_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); -GtkWidget * query_size_box (char *title, - char *message, - float initial, - float lower, - float upper, - int digits, +GtkWidget * query_size_box (gchar *title, + gchar *message, + gfloat initial, + gfloat lower, + gfloat upper, + gint digits, GUnit unit, - float resolution, + gfloat resolution, GtkObject *object, + gchar *signal, QueryFunc callback, gpointer data); diff --git a/app/palette.c b/app/palette.c index 2a68c578a4..b35ea5d8bb 100644 --- a/app/palette.c +++ b/app/palette.c @@ -1348,8 +1348,11 @@ static void palette_new_entries_callback (GtkWidget *w, gpointer client_data) { - query_string_box (_("New Palette"), _("Enter a name for new palette"), - NULL, NULL, palette_add_entries_callback, client_data); + query_string_box (_("New Palette"), + _("Enter a name for new palette"), + NULL, + NULL, NULL, + palette_add_entries_callback, client_data); } static void @@ -2709,10 +2712,13 @@ palette_merge_entries_callback (GtkWidget *w, static void palette_merge_dialog_callback (GtkWidget *w, - gpointer client_data) + gpointer client_data) { - query_string_box (_("Merge Palette"), _("Enter a name for merged palette"), - NULL, NULL, palette_merge_entries_callback, client_data); + query_string_box (_("Merge Palette"), + _("Enter a name for merged palette"), + NULL, + NULL, NULL, + palette_merge_entries_callback, client_data); } static void @@ -2731,7 +2737,8 @@ palette_import_dialog_callback (GtkWidget *w, } static void -palette_import_fill_grad_preview(GtkWidget *preview,gradient_t *gradient) +palette_import_fill_grad_preview(GtkWidget *preview, + gradient_t *gradient) { guchar buffer[3*IMPORT_PREVIEW_WIDTH]; gint loop; diff --git a/app/paths_dialog.c b/app/paths_dialog.c index b87ad7ab18..1d57af1845 100644 --- a/app/paths_dialog.c +++ b/app/paths_dialog.c @@ -1053,10 +1053,11 @@ paths_dialog_edit_path_query(GtkWidget *widget) NULL, &mask); - query_string_box(N_("Rename path"), - N_("Enter a new name for the path"), + query_string_box(_("Rename path"), + _("Enter a new name for the path"), text, - NULL, do_rename_paths_callback, widget); + NULL, NULL, + do_rename_paths_callback, widget); } static gint diff --git a/app/user_install.c b/app/user_install.c index 5c4b9bbc22..b2a93ac952 100644 --- a/app/user_install.c +++ b/app/user_install.c @@ -106,6 +106,138 @@ install_help (InstallCallback callback) GdkFont *font_strong; GdkFont *font_emphasis; GdkFont *font; + static const struct { + gint font; + char *text; + } help_lines[] = { + { 2, N_("The GIMP - GNU Image Manipulation Program\n\n") }, + { 1, N_("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n") }, + { 0, "\n" }, + + { 0, N_("This program is free software; you can redistribute it and/or modify\n") }, + { 0, N_("it under the terms of the GNU General Public License as published by\n") }, + { 0, N_("the Free Software Foundation; either version 2 of the License, or\n") }, + { 0, N_("(at your option) any later version.\n") }, + { 0, "\n" }, + { 0, N_("This program is distributed in the hope that it will be useful,\n") }, + { 0, N_("but WITHOUT ANY WARRANTY; without even the implied warranty of\n") }, + { 0, N_("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n") }, + { 0, N_("See the GNU General Public License for more details.\n") }, + { 0, "\n" }, + { 0, N_("You should have received a copy of the GNU General Public License\n") }, + { 0, N_("along with this program; if not, write to the Free Software\n") }, + { 0, N_("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n") }, + { 0, "\n\n" }, + + { 2, N_("Personal GIMP Installation\n\n") }, + { 0, N_("For a proper GIMP installation, a subdirectory called\n") }, + { 1, NULL }, /* will be replaced with gimp_directory() */ + { 0, N_(" needs to be created. This\n") }, + { 0, N_("subdirectory will contain a number of important files:\n\n") }, + + { 1, N_("gimprc\n") }, + { 0, N_("\t\tThe gimprc is used to store personal preferences\n") }, + { 0, N_("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n") }, + { 0, N_("\t\tPaths to search for brushes, palettes, gradients\n") }, + { 0, N_("\t\tpatterns, plug-ins and modules are also configured here.\n") }, + + { 1, N_("unitrc\n") }, + { 0, N_("\t\tThe unitrc is used to store your user units database.\n") }, + { 0, N_("\t\tYou can define additional units and use them just\n") }, + { 0, N_("\t\tlike you use the built-in units inches, millimeters,\n") }, + { 0, N_("\t\tpoints and picas. This file is overwritten each time\n") }, + { 0, N_("\t\tyou quit the GIMP.\n") }, + + { 1, N_("pluginrc\n") }, + { 0, N_("\t\tPlug-ins and extensions are external programs run by\n") }, + { 0, N_("\t\tthe GIMP which provide additional functionality.\n") }, + { 0, N_("\t\tThese programs are searched for at run-time and\n") }, + { 0, N_("\t\tinformation about their functionality and mod-times\n") }, + { 0, N_("\t\tis cached in this file. This file is intended to\n") }, + { 0, N_("\t\tbe GIMP-readable only, and should not be edited.\n") }, + + { 1, N_("brushes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined brushes. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp brushes installation when searching for\n") }, + { 0, N_("\t\tbrushes.\n") }, + + { 1, N_("gradients\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gradients. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp gradients installation when searching for\n") }, + { 0, N_("\t\tgradients.\n") }, + + { 1, N_("gfig\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined figures to be used by the gfig plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gfig installation\n") }, + { 0, N_("\t\twhen searching for gfig figures.\n") }, + + { 1, N_("gflares\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined gflares to be used by the gflare plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp gflares installation\n") }, + { 0, N_("\t\twhen searching for gflares.\n") }, + + { 1, N_("fractalexplorer\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined fractals to be used by the FractalExplorer plug-in.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory in\n") }, + { 0, N_("\t\taddition to the systemwide gimp FractalExplorer installation\n") }, + { 0, N_("\t\twhen searching for fractals.\n") }, + + { 1, N_("palettes\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined palettes. The default gimprc file\n") }, + { 0, N_("\t\tchecks only this subdirectory (not the system-wide\n") }, + { 0, N_("\t\tinstallation) when searching for palettes. During\n") }, + { 0, N_("\t\tinstallation, the system palettes will be copied\n") }, + { 0, N_("\t\there. This is done to allow modifications made to\n") }, + { 0, N_("\t\tpalettes during GIMP execution to persist across\n") }, + { 0, N_("\t\tsessions.\n") }, + + { 1, N_("patterns\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser defined patterns. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide gimp patterns installation when searching for\n") }, + { 0, N_("\t\tpatterns.\n") }, + + { 1, N_("plug-ins\n") }, + { 0, N_("\t\tThis is a subdirectory which can be used to store\n") }, + { 0, N_("\t\tuser created, temporary, or otherwise non-system-\n") }, + { 0, N_("\t\tsupported plug-ins. The default gimprc file\n") }, + { 0, N_("\t\tchecks this subdirectory in addition to the system-\n") }, + { 0, N_("\t\twide GIMP plug-in directories when searching for\n") }, + { 0, N_("\t\tplug-ins.\n") }, + + { 1, N_("modules\n") }, + { 0, N_("\t\tThis subdirectory can be used to store user created,\n") }, + { 0, N_("\t\ttemporary, or otherwise non-system-supported DLL modules.\n") }, + { 0, N_("\t\tThe default gimprc file checks this subdirectory\n") }, + { 0, N_("\t\tin addition to the system-wide GIMP module directory\n") }, + { 0, N_("\t\twhen searching for modules to load when initialising.\n") }, + + { 1, N_("scripts\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to store \n") }, + { 0, N_("\t\tuser created and installed scripts. The default gimprc\n") }, + { 0, N_("\t\tfile checks this subdirectory in addition to the system\n") }, + { 0, N_("\t\t-wide gimp scripts subdirectory when searching for scripts\n") }, + + { 1, N_("tmp\n") }, + { 0, N_("\t\tThis subdirectory is used by the GIMP to temporarily\n") }, + { 0, N_("\t\tstore undo buffers to reduce memory usage. If GIMP is\n") }, + { 0, N_("\t\tunceremoniously killed, files may persist in this directory\n") }, + { 0, N_("\t\tof the form: gimp<#>.<#>. These files are useless across\n") }, + { 0, N_("\t\tGIMP sessions and can be destroyed with impunity.\n") } + }; + gint nhelp_lines = sizeof (help_lines) / sizeof (help_lines[0]); + gint i; help_widget = gtk_dialog_new (); gtk_signal_connect (GTK_OBJECT (help_widget), "delete_event", @@ -147,213 +279,20 @@ install_help (InstallCallback callback) /* Realize the widget before allowing new text to be inserted */ gtk_widget_realize (text); - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("The GIMP - GNU Image Manipulation Program\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("Copyright (C) 1995 Spencer Kimball and Peter Mattis\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is free software; you can redistribute it and/or modify\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("it under the terms of the GNU General Public License as published by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("the Free Software Foundation; either version 2 of the License, or\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("(at your option) any later version.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("This program is distributed in the hope that it will be useful,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("See the GNU General Public License for more details.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n", -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("You should have received a copy of the GNU General Public License\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("along with this program; if not, write to the Free Software\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - "\n\n", -1); - - gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, - _("Personal GIMP Installation\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("For a proper GIMP installation, a subdirectory called\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - gimp_directory (), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _(" needs to be created. This\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("subdirectory will contain a number of important files:\n\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe gimprc is used to store personal preferences\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsuch as default GIMP behaviors & plug-in hotkeys.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPaths to search for brushes, palettes, gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("unitrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe unitrc is used to store your user units database.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tYou can define additional units and use them just\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tlike you use the built-in units inches, millimeters,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpoints and picas. This file is overwritten each time\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tyou quit the GIMP.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("pluginrc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tPlug-ins and extensions are external programs run by\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tthe GIMP which provide additional functionality.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThese programs are searched for at run-time and\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinformation about their functionality and mod-times\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tis cached in this file. This file is intended to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbe GIMP-readable only, and should not be edited.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("brushes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined brushes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp brushes installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tbrushes.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gradients\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gradients. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp gradients installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tgradients.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gfig\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined figures to be used by the gfig plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gfig installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gfig figures.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("gflares\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined gflares to be used by the gflare plug-in.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory in\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\taddition to the systemwide gimp gflares installation\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for gflares.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("palettes\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined palettes. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks only this subdirectory (not the system-wide\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation) when searching for palettes. During\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tinstallation, the system palettes will be copied\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\there. This is done to allow modifications made to\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpalettes during GIMP execution to persist across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsessions.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("patterns\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser defined patterns. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide gimp patterns installation when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tpatterns.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("plug-ins\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis is a subdirectory which can be used to store\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created, temporary, or otherwise non-system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tsupported plug-ins. The default gimprc file\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tchecks this subdirectory in addition to the system-\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twide GIMP plug-in directories when searching for\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tplug-ins.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("modules\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory can be used to store user created,\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThe default gimprc file checks this subdirectory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tin addition to the system-wide GIMP module directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\twhen searching for modules to load when initialising.\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to store \n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tuser created and installed scripts. The default gimprc\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tfile checks this subdirectory in addition to the system\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\t-wide gimp scripts subdirectory when searching for scripts\n"), -1); - gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL, - _("tmp\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tThis subdirectory is used by the GIMP to temporarily\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tstore undo buffers to reduce memory usage. If GIMP is\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tunceremoniously killed, files may persist in this directory\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tof the form: gimp<#>.<#>. These files are useless across\n"), -1); - gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, - _("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1); + for (i = 0; i < nhelp_lines; i++) + if (help_lines[i].text == NULL) + /* inserting gimp_directory () this way is a little ugly */ + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gimp_directory (), -1); + else + gtk_text_insert (GTK_TEXT (text), + (help_lines[i].font == 2) ? font_strong : + (help_lines[i].font == 1) ? font_emphasis : font, + NULL, NULL, + gettext (help_lines[i].text), -1); /* scroll back to the top */ gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0); diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c index 1f7edddb68..fecbfb297b 100644 --- a/app/widgets/gimpgradienteditor.c +++ b/app/widgets/gimpgradienteditor.c @@ -1256,10 +1256,11 @@ ed_close_callback(GtkWidget *widget, gpointer client_data) static void ed_new_gradient_callback(GtkWidget *widget, gpointer client_data) { - query_string_box(N_("New gradient"), - N_("Enter a name for the new gradient"), - N_("untitled"), - NULL, ed_do_new_gradient_callback, NULL); + query_string_box(_("New gradient"), + _("Enter a name for the new gradient"), + _("untitled"), + NULL, NULL, + ed_do_new_gradient_callback, NULL); } /* ed_new_gradient_callback */ @@ -1365,10 +1366,11 @@ ed_copy_gradient_callback(GtkWidget *widget, gpointer client_data) name = g_strdup_printf(_("%s copy"), curr_gradient->name); - query_string_box(N_("Copy gradient"), - N_("Enter a name for the copied gradient"), + query_string_box(_("Copy gradient"), + _("Enter a name for the copied gradient"), name, - NULL, ed_do_copy_gradient_callback, NULL); + NULL, NULL, + ed_do_copy_gradient_callback, NULL); g_free(name); } /* ed_copy_gradient_callback */ @@ -1594,10 +1596,11 @@ ed_rename_grads_callback(GtkWidget *widget, gpointer client_data) if(curr_gradient == NULL) return; - query_string_box(N_("Rename gradient"), - N_("Enter a new name for the gradient"), + query_string_box(_("Rename gradient"), + _("Enter a new name for the gradient"), curr_gradient->name, - NULL, ed_do_rename_gradient_callback, curr_gradient); + NULL, NULL, + ed_do_rename_gradient_callback, curr_gradient); } /*****/ @@ -2246,16 +2249,16 @@ control_do_hint(gint x, gint y) case GRAD_DRAG_LEFT: if (seg != NULL) { if (seg->prev != NULL) - ed_set_hint(N_("Drag: move Shift+drag: move & compress")); + ed_set_hint(_("Drag: move Shift+drag: move & compress")); else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); } else - ed_set_hint(N_("Click: select Shift+click: extend selection")); + ed_set_hint(_("Click: select Shift+click: extend selection")); break; case GRAD_DRAG_MIDDLE: - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move")); break; @@ -2266,7 +2269,7 @@ control_do_hint(gint x, gint y) break; } /* switch */ } else - ed_set_hint(N_("Click: select Shift+click: extend selection " + ed_set_hint(_("Click: select Shift+click: extend selection " "Drag: move Shift+drag: move & compress")); } /* control_do_hint */ diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c index 2a68c578a4..b35ea5d8bb 100644 --- a/app/widgets/gimppaletteeditor.c +++ b/app/widgets/gimppaletteeditor.c @@ -1348,8 +1348,11 @@ static void palette_new_entries_callback (GtkWidget *w, gpointer client_data) { - query_string_box (_("New Palette"), _("Enter a name for new palette"), - NULL, NULL, palette_add_entries_callback, client_data); + query_string_box (_("New Palette"), + _("Enter a name for new palette"), + NULL, + NULL, NULL, + palette_add_entries_callback, client_data); } static void @@ -2709,10 +2712,13 @@ palette_merge_entries_callback (GtkWidget *w, static void palette_merge_dialog_callback (GtkWidget *w, - gpointer client_data) + gpointer client_data) { - query_string_box (_("Merge Palette"), _("Enter a name for merged palette"), - NULL, NULL, palette_merge_entries_callback, client_data); + query_string_box (_("Merge Palette"), + _("Enter a name for merged palette"), + NULL, + NULL, NULL, + palette_merge_entries_callback, client_data); } static void @@ -2731,7 +2737,8 @@ palette_import_dialog_callback (GtkWidget *w, } static void -palette_import_fill_grad_preview(GtkWidget *preview,gradient_t *gradient) +palette_import_fill_grad_preview(GtkWidget *preview, + gradient_t *gradient) { guchar buffer[3*IMPORT_PREVIEW_WIDTH]; gint loop; diff --git a/configure.in b/configure.in index 5c37b4f2f3..237b06749b 100644 --- a/configure.in +++ b/configure.in @@ -685,6 +685,8 @@ plug-ins/xpm/Makefile plug-ins/AlienMap/Makefile plug-ins/CEL/Makefile plug-ins/CML_explorer/Makefile +plug-ins/FractalExplorer/Makefile +plug-ins/FractalExplorer/fractalexplorer-examples/Makefile plug-ins/Lighting/Makefile plug-ins/MapObject/Makefile plug-ins/align_layers/Makefile diff --git a/data/misc/user_install b/data/misc/user_install index e67970810c..4134b22045 100755 --- a/data/misc/user_install +++ b/data/misc/user_install @@ -34,14 +34,16 @@ echo "mkdir $2/plug-ins" mkdir $2/plug-ins echo "mkdir $2/modules" mkdir $2/modules -echo "mkdir $2/gfig" -mkdir $2/gfig -echo "mkdir $2/tmp" -mkdir $2/tmp echo "mkdir $2/scripts" mkdir $2/scripts +echo "mkdir $2/tmp" +mkdir $2/tmp +echo "mkdir $2/gfig" +mkdir $2/gfig echo "mkdir $2/gflares" mkdir $2/gflares +echo "mkdir $2/fractalexplorer" +mkdir $2/fractalexplorer echo "cp $1/palettes/* $2/palettes" cp $1/palettes/* $2/palettes diff --git a/data/misc/user_install.bat b/data/misc/user_install.bat index c37957a899..f1791c625f 100644 --- a/data/misc/user_install.bat +++ b/data/misc/user_install.bat @@ -10,8 +10,9 @@ mkdir %2\palettes mkdir %2\patterns mkdir %2\plug-ins mkdir %2\modules -mkdir %2\gfig mkdir %2\scripts +mkdir %2\gfig mkdir %2\gflares +mkdir %2\fractalexplorer pause diff --git a/etc/gimprc.in b/etc/gimprc.in index 2bd7fc3f70..22caf312f1 100644 --- a/etc/gimprc.in +++ b/etc/gimprc.in @@ -238,9 +238,6 @@ (transparency-type 1) (transparency-size 2) -# gfig pattern directory -(gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig") - # This string sets how image window titles are formatted. # The following percent expansions are performed: # %% literal percent sign @@ -254,4 +251,10 @@ # %d destination scale factor (image-title-format "%f-%p.%i (%t) %z%%") +# gfig pattern directory +(gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig") + +# fractalexplorer path +(fractalexplorer-path "${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer") + # [end of file] diff --git a/etc/unitrc b/etc/unitrc index 7e9ed1b51b..a8c52beb03 100644 --- a/etc/unitrc +++ b/etc/unitrc @@ -37,19 +37,18 @@ (singular "yard") (plural "yards")) -(unit-info "typorg. points" +(unit-info "typogr. points" (factor 72.270000) (digits 0) (symbol "tpt") (abbreviation "tpt") (singular "typogr. point") - (plural "typorg. points")) + (plural "typogr. points")) -(unit-info "typorg. picas" +(unit-info "typogr. picas" (factor 6.022500) (digits 1) (symbol "tpc") (abbreviation "tpc") (singular "typogr. pica") - (plural "typorg. picas")) - + (plural "typogr. picas")) diff --git a/gimprc.in b/gimprc.in index 2bd7fc3f70..22caf312f1 100644 --- a/gimprc.in +++ b/gimprc.in @@ -238,9 +238,6 @@ (transparency-type 1) (transparency-size 2) -# gfig pattern directory -(gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig") - # This string sets how image window titles are formatted. # The following percent expansions are performed: # %% literal percent sign @@ -254,4 +251,10 @@ # %d destination scale factor (image-title-format "%f-%p.%i (%t) %z%%") +# gfig pattern directory +(gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig") + +# fractalexplorer path +(fractalexplorer-path "${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer") + # [end of file] diff --git a/libgimp/gimpimage.c b/libgimp/gimpimage.c index 9292e19dca..6f36f5d215 100644 --- a/libgimp/gimpimage.c +++ b/libgimp/gimpimage.c @@ -1040,8 +1040,6 @@ gimp_image_get_unit (gint32 image_ID) int nreturn_vals; GUnit unit; - g_return_if_fail(unit); - return_vals = gimp_run_procedure ("gimp_image_get_unit", &nreturn_vals, PARAM_IMAGE, image_ID, diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c index 9292e19dca..6f36f5d215 100644 --- a/libgimp/gimpimage_pdb.c +++ b/libgimp/gimpimage_pdb.c @@ -1040,8 +1040,6 @@ gimp_image_get_unit (gint32 image_ID) int nreturn_vals; GUnit unit; - g_return_if_fail(unit); - return_vals = gimp_run_procedure ("gimp_image_get_unit", &nreturn_vals, PARAM_IMAGE, image_ID, diff --git a/libgimp/gimpunitmenu.c b/libgimp/gimpunitmenu.c index 911fac16e0..60d5fe45d7 100644 --- a/libgimp/gimpunitmenu.c +++ b/libgimp/gimpunitmenu.c @@ -35,6 +35,23 @@ enum { static gint gimp_unit_menu_signals[LAST_SIGNAL] = { 0 }; +static GtkOptionMenuClass *parent_class = NULL; + +static void +gimp_unit_menu_class_destroy (GtkObject *object) +{ + GimpUnitMenu *gum; + + g_return_if_fail (object != NULL); + g_return_if_fail (GIMP_IS_UNIT_MENU (object)); + + gum = GIMP_UNIT_MENU (object); + + g_free (gum->format); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} static void gimp_unit_menu_class_init (GimpUnitMenuClass *class) @@ -43,6 +60,8 @@ gimp_unit_menu_class_init (GimpUnitMenuClass *class) object_class = (GtkObjectClass*) class; + parent_class = gtk_type_class (gtk_option_menu_get_type ()); + gimp_unit_menu_signals[GUM_UNIT_CHANGED_SIGNAL] = gtk_signal_new ("unit_changed", GTK_RUN_FIRST, @@ -52,6 +71,8 @@ gimp_unit_menu_class_init (GimpUnitMenuClass *class) gtk_object_class_add_signals (object_class, gimp_unit_menu_signals, LAST_SIGNAL); + + object_class->destroy = gimp_unit_menu_class_destroy; class->gimp_unit_menu = NULL; } @@ -60,6 +81,8 @@ static void gimp_unit_menu_init (GimpUnitMenu *gum) { gum->selection = NULL; + gum->clist = NULL; + gum->format = NULL; gum->unit = UNIT_PIXEL; gum->start = 0; } @@ -105,7 +128,8 @@ gimp_unit_menu_new (gchar *format, g_return_val_if_fail ((unit >= UNIT_PIXEL) && (unit < gimp_unit_get_number_of_units ()), NULL); - if (with_custom); /* avoid 'unused variable' compiler warning */ + if (unit >= gimp_unit_get_number_of_built_in_units ()) + with_custom = TRUE; gum = gtk_type_new (gimp_unit_menu_get_type ()); @@ -125,7 +149,7 @@ gimp_unit_menu_new (gchar *format, gtk_signal_connect (GTK_OBJECT (menuitem), "activate", (GtkSignalFunc) gimp_unit_menu_callback, gum); gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", (gpointer)u); - gtk_widget_show(menuitem); + gtk_widget_show (menuitem); /* add a separator after pixels */ if (u == UNIT_PIXEL) @@ -135,6 +159,7 @@ gimp_unit_menu_new (gchar *format, gtk_widget_show (menuitem); } } + if (unit >= gimp_unit_get_number_of_built_in_units ()) { menuitem = gtk_menu_item_new (); @@ -150,18 +175,21 @@ gimp_unit_menu_new (gchar *format, gtk_widget_show(menuitem); } - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); + if (with_custom) + { + menuitem = gtk_menu_item_new (); + gtk_menu_append (GTK_MENU (menu), menuitem); + gtk_widget_show (menuitem); - menuitem = - gtk_menu_item_new_with_label (_("More...")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - (GtkSignalFunc) gimp_unit_menu_callback, gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer)65536); - gtk_widget_show(menuitem); + menuitem = + gtk_menu_item_new_with_label (_("More...")); + gtk_menu_append (GTK_MENU (menu), menuitem); + gtk_signal_connect (GTK_OBJECT (menuitem), "activate", + (GtkSignalFunc) gimp_unit_menu_callback, gum); + gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", + (gpointer)65536); + gtk_widget_show(menuitem); + } gtk_option_menu_set_menu (GTK_OPTION_MENU (gum), menu); @@ -266,7 +294,6 @@ gimp_unit_menu_build_string (gchar *format, GUnit unit) #define BUFFER_LEN 64 static gchar buffer[BUFFER_LEN]; - gchar format_buffer[16]; int i = 0; while (i < (BUFFER_LEN - 1) && *format) @@ -284,40 +311,39 @@ gimp_unit_menu_build_string (gchar *format, GUnit unit) case '%': buffer[i++] = '%'; break; - + case 'f': /* factor (how many units make up an inch) */ - g_snprintf(format_buffer, 16, "%%.%df", - gimp_unit_get_digits (unit)); - i += print (buffer, BUFFER_LEN, i, format_buffer, + i += print (buffer, BUFFER_LEN, i, "%f", gimp_unit_get_factor (unit)); break; - + case 'y': /* symbol ("''" for inch) */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_symbol (unit)); break; - + case 'a': /* abbreviation */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_abbreviation (unit)); break; - + case 's': /* singular */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_singular (unit)); break; + case 'p': /* plural */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_plural (unit)); break; - + default: g_warning (_("unit-menu-format contains unknown" "format sequence '%%%c'"), *format); break; } break; - + default: buffer[i++] = *format; break; @@ -398,13 +424,12 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) gchar *row[2]; GUnit unit; gint num_units; - gchar buffer[32]; gum->selection = gtk_dialog_new (); gtk_window_set_wmclass (GTK_WINDOW (gum->selection), "unitselection", "Gimp"); gtk_window_set_title (GTK_WINDOW (gum->selection), _("Unit Selection")); - gtk_window_set_policy(GTK_WINDOW(gum->selection), FALSE, TRUE, FALSE); + gtk_window_set_policy (GTK_WINDOW(gum->selection), FALSE, TRUE, FALSE); vbox = gtk_vbox_new (FALSE, 2); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (gum->selection)->vbox), vbox); @@ -414,7 +439,6 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) gtk_signal_connect (GTK_OBJECT (gum->selection), "delete_event", GTK_SIGNAL_FUNC (gimp_unit_menu_selection_delete_callback), gum); - gtk_signal_connect (GTK_OBJECT (gum), "destroy", GTK_SIGNAL_FUNC (gimp_unit_menu_selection_close_callback), gum); @@ -448,7 +472,7 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) gtk_widget_show(scrolled_win); gtk_widget_show(gum->clist); - gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG (gum->selection)->action_area), 2); + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (gum->selection)->action_area), 2); gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (gum->selection)->action_area), FALSE); hbbox = gtk_hbutton_box_new (); @@ -478,14 +502,15 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) for (unit = UNIT_END; unit < num_units; unit++) { - row[0] = gimp_unit_menu_build_string (gum->format, unit); - g_snprintf (buffer, sizeof(buffer), "(%f)", - gimp_unit_get_factor (unit)); - row[1] = buffer; + row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit)); + row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit)); gtk_clist_append (GTK_CLIST (gum->clist), row); gtk_clist_set_row_data (GTK_CLIST (gum->clist), unit - UNIT_END, (gpointer)unit); + + g_free (row[0]); + g_free (row[1]); } /* Now show the dialog */ @@ -515,6 +540,7 @@ gimp_unit_menu_callback (GtkWidget *widget, if (gum->unit == new_unit) return; + /* was "More..." selected? */ if (new_unit == 65536) { gtk_option_menu_set_history (GTK_OPTION_MENU (gum), diff --git a/libgimpwidgets/gimpunitmenu.c b/libgimpwidgets/gimpunitmenu.c index 911fac16e0..60d5fe45d7 100644 --- a/libgimpwidgets/gimpunitmenu.c +++ b/libgimpwidgets/gimpunitmenu.c @@ -35,6 +35,23 @@ enum { static gint gimp_unit_menu_signals[LAST_SIGNAL] = { 0 }; +static GtkOptionMenuClass *parent_class = NULL; + +static void +gimp_unit_menu_class_destroy (GtkObject *object) +{ + GimpUnitMenu *gum; + + g_return_if_fail (object != NULL); + g_return_if_fail (GIMP_IS_UNIT_MENU (object)); + + gum = GIMP_UNIT_MENU (object); + + g_free (gum->format); + + if (GTK_OBJECT_CLASS (parent_class)->destroy) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} static void gimp_unit_menu_class_init (GimpUnitMenuClass *class) @@ -43,6 +60,8 @@ gimp_unit_menu_class_init (GimpUnitMenuClass *class) object_class = (GtkObjectClass*) class; + parent_class = gtk_type_class (gtk_option_menu_get_type ()); + gimp_unit_menu_signals[GUM_UNIT_CHANGED_SIGNAL] = gtk_signal_new ("unit_changed", GTK_RUN_FIRST, @@ -52,6 +71,8 @@ gimp_unit_menu_class_init (GimpUnitMenuClass *class) gtk_object_class_add_signals (object_class, gimp_unit_menu_signals, LAST_SIGNAL); + + object_class->destroy = gimp_unit_menu_class_destroy; class->gimp_unit_menu = NULL; } @@ -60,6 +81,8 @@ static void gimp_unit_menu_init (GimpUnitMenu *gum) { gum->selection = NULL; + gum->clist = NULL; + gum->format = NULL; gum->unit = UNIT_PIXEL; gum->start = 0; } @@ -105,7 +128,8 @@ gimp_unit_menu_new (gchar *format, g_return_val_if_fail ((unit >= UNIT_PIXEL) && (unit < gimp_unit_get_number_of_units ()), NULL); - if (with_custom); /* avoid 'unused variable' compiler warning */ + if (unit >= gimp_unit_get_number_of_built_in_units ()) + with_custom = TRUE; gum = gtk_type_new (gimp_unit_menu_get_type ()); @@ -125,7 +149,7 @@ gimp_unit_menu_new (gchar *format, gtk_signal_connect (GTK_OBJECT (menuitem), "activate", (GtkSignalFunc) gimp_unit_menu_callback, gum); gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", (gpointer)u); - gtk_widget_show(menuitem); + gtk_widget_show (menuitem); /* add a separator after pixels */ if (u == UNIT_PIXEL) @@ -135,6 +159,7 @@ gimp_unit_menu_new (gchar *format, gtk_widget_show (menuitem); } } + if (unit >= gimp_unit_get_number_of_built_in_units ()) { menuitem = gtk_menu_item_new (); @@ -150,18 +175,21 @@ gimp_unit_menu_new (gchar *format, gtk_widget_show(menuitem); } - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_show (menuitem); + if (with_custom) + { + menuitem = gtk_menu_item_new (); + gtk_menu_append (GTK_MENU (menu), menuitem); + gtk_widget_show (menuitem); - menuitem = - gtk_menu_item_new_with_label (_("More...")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - (GtkSignalFunc) gimp_unit_menu_callback, gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer)65536); - gtk_widget_show(menuitem); + menuitem = + gtk_menu_item_new_with_label (_("More...")); + gtk_menu_append (GTK_MENU (menu), menuitem); + gtk_signal_connect (GTK_OBJECT (menuitem), "activate", + (GtkSignalFunc) gimp_unit_menu_callback, gum); + gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", + (gpointer)65536); + gtk_widget_show(menuitem); + } gtk_option_menu_set_menu (GTK_OPTION_MENU (gum), menu); @@ -266,7 +294,6 @@ gimp_unit_menu_build_string (gchar *format, GUnit unit) #define BUFFER_LEN 64 static gchar buffer[BUFFER_LEN]; - gchar format_buffer[16]; int i = 0; while (i < (BUFFER_LEN - 1) && *format) @@ -284,40 +311,39 @@ gimp_unit_menu_build_string (gchar *format, GUnit unit) case '%': buffer[i++] = '%'; break; - + case 'f': /* factor (how many units make up an inch) */ - g_snprintf(format_buffer, 16, "%%.%df", - gimp_unit_get_digits (unit)); - i += print (buffer, BUFFER_LEN, i, format_buffer, + i += print (buffer, BUFFER_LEN, i, "%f", gimp_unit_get_factor (unit)); break; - + case 'y': /* symbol ("''" for inch) */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_symbol (unit)); break; - + case 'a': /* abbreviation */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_abbreviation (unit)); break; - + case 's': /* singular */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_singular (unit)); break; + case 'p': /* plural */ i += print (buffer, BUFFER_LEN, i, "%s", gimp_unit_get_plural (unit)); break; - + default: g_warning (_("unit-menu-format contains unknown" "format sequence '%%%c'"), *format); break; } break; - + default: buffer[i++] = *format; break; @@ -398,13 +424,12 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) gchar *row[2]; GUnit unit; gint num_units; - gchar buffer[32]; gum->selection = gtk_dialog_new (); gtk_window_set_wmclass (GTK_WINDOW (gum->selection), "unitselection", "Gimp"); gtk_window_set_title (GTK_WINDOW (gum->selection), _("Unit Selection")); - gtk_window_set_policy(GTK_WINDOW(gum->selection), FALSE, TRUE, FALSE); + gtk_window_set_policy (GTK_WINDOW(gum->selection), FALSE, TRUE, FALSE); vbox = gtk_vbox_new (FALSE, 2); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (gum->selection)->vbox), vbox); @@ -414,7 +439,6 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) gtk_signal_connect (GTK_OBJECT (gum->selection), "delete_event", GTK_SIGNAL_FUNC (gimp_unit_menu_selection_delete_callback), gum); - gtk_signal_connect (GTK_OBJECT (gum), "destroy", GTK_SIGNAL_FUNC (gimp_unit_menu_selection_close_callback), gum); @@ -448,7 +472,7 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) gtk_widget_show(scrolled_win); gtk_widget_show(gum->clist); - gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG (gum->selection)->action_area), 2); + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (gum->selection)->action_area), 2); gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (gum->selection)->action_area), FALSE); hbbox = gtk_hbutton_box_new (); @@ -478,14 +502,15 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum) for (unit = UNIT_END; unit < num_units; unit++) { - row[0] = gimp_unit_menu_build_string (gum->format, unit); - g_snprintf (buffer, sizeof(buffer), "(%f)", - gimp_unit_get_factor (unit)); - row[1] = buffer; + row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit)); + row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit)); gtk_clist_append (GTK_CLIST (gum->clist), row); gtk_clist_set_row_data (GTK_CLIST (gum->clist), unit - UNIT_END, (gpointer)unit); + + g_free (row[0]); + g_free (row[1]); } /* Now show the dialog */ @@ -515,6 +540,7 @@ gimp_unit_menu_callback (GtkWidget *widget, if (gum->unit == new_unit) return; + /* was "More..." selected? */ if (new_unit == 65536) { gtk_option_menu_set_history (GTK_OPTION_MENU (gum), diff --git a/plug-ins/FractalExplorer/.cvsignore b/plug-ins/FractalExplorer/.cvsignore new file mode 100644 index 0000000000..0fb1823c46 --- /dev/null +++ b/plug-ins/FractalExplorer/.cvsignore @@ -0,0 +1,7 @@ +Makefile.in +Makefile +.deps +_libs +.libs +*.o +FractalExplorer diff --git a/plug-ins/FractalExplorer/Callbacks.h b/plug-ins/FractalExplorer/Callbacks.h new file mode 100644 index 0000000000..95a1cc7e96 --- /dev/null +++ b/plug-ins/FractalExplorer/Callbacks.h @@ -0,0 +1,366 @@ +/********************************************************************** + FUNCTION: dialog_close_callback + *********************************************************************/ + +void +dialog_close_callback(GtkWidget * widget, gpointer data) +{ + gtk_main_quit(); +} /* dialog_close_callback */ + +/********************************************************************** + FUNCTION: dialog_save_callback + *********************************************************************/ + +void +dialog_save_callback(GtkWidget * widget, gpointer data) +{ + create_file_selection(); +} /* dialog_save_callback */ + +/********************************************************************** + FUNCTION: dialog_savelanguage_callback + *********************************************************************/ + +void +dialog_savelanguage_callback(GtkWidget * widget, gpointer data) +{ + FILE * fp; + char * filname; + + filname = g_strconcat (gimp_directory (), + G_DIR_SEPARATOR_S, + "fractalexplorerrc", + NULL); + lng=wvals.language; + fp = fopen (filname, "w"); + if (fp) { + if (lng==0) fputs("FX-LANG:En\n",fp); + if (lng==1) fputs("FX-LANG:Fr\n",fp); + if (lng==2) fputs("FX-LANG:De\n",fp); + fclose(fp); + } + + g_free (filename); +} /* dialog_savelanguage_callback */ + + +/********************************************************************** + FUNCTION: load_button_press + *********************************************************************/ + +void +load_button_press(GtkWidget * widget, + gpointer data) +{ + create_load_file_selection(); +} + + +/********************************************************************** + FUNCTION: dialog_ok_callback + *********************************************************************/ + +void +dialog_ok_callback(GtkWidget * widget, gpointer data) +{ + wint.run = TRUE; + gtk_widget_destroy(GTK_WIDGET(data)); +} /* dialog_ok_callback */ + +/********************************************************************** + FUNCTION: dialog_reset_callback + *********************************************************************/ + +void +dialog_reset_callback(GtkWidget * widget, gpointer data) +{ + wvals.xmin = standardvals.xmin; + wvals.xmax = standardvals.xmax; + wvals.ymin = standardvals.ymin; + wvals.ymax = standardvals.ymax; + wvals.iter = standardvals.iter; + wvals.cx = standardvals.cx; + wvals.cy = standardvals.cy; + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); +} + +/********************************************************************** + FUNCTION: dialog_redraw_callback + *********************************************************************/ + +void +dialog_redraw_callback(GtkWidget * widget, gpointer data) +{ + int alwaysprev = wvals.alwayspreview; + wvals.alwayspreview = TRUE; + set_cmap_preview(); + dialog_update_preview(); + wvals.alwayspreview = alwaysprev; +} + +/********************************************************************** + FUNCTION: dialog_cancel_callback + *********************************************************************/ + +void +dialog_cancel_callback(GtkWidget * widget, gpointer data) +{ + gtk_widget_destroy(GTK_WIDGET(data)); +} /* dialog_cancel_callback */ + +/********************************************************************** + FUNCTION: dialog_undo_zoom_callback + *********************************************************************/ + +void +dialog_undo_zoom_callback(GtkWidget * widget, gpointer data) +{ + if (zoomindex > 1) { + zooms[zoomindex] = wvals; + zoomindex--; + wvals = zooms[zoomindex]; + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); + } +} /* dialog_undo_zoom_callback */ + +/********************************************************************** + FUNCTION: dialog_redo_zoom_callback + *********************************************************************/ + +void +dialog_redo_zoom_callback(GtkWidget * widget, gpointer data) +{ + if (zoomindex < zoommax) { + zoomindex++; + wvals = zooms[zoomindex]; + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); + } +} /* dialog_redo_zoom_callback */ + +/********************************************************************** + FUNCTION: dialog_step_in_callback + *********************************************************************/ + +void +dialog_step_in_callback(GtkWidget * widget, gpointer data) +{ + double xdifferenz; + double ydifferenz; + if (zoomindex < zoommax) { + zooms[zoomindex]=wvals; + zoomindex++; + } + xdifferenz=wvals.xmax-wvals.xmin; + ydifferenz=wvals.ymax-wvals.ymin; + wvals.xmin+=1.0/6.0*xdifferenz; + wvals.ymin+=1.0/6.0*ydifferenz; + wvals.xmax-=1.0/6.0*xdifferenz; + wvals.ymax-=1.0/6.0*ydifferenz; + zooms[zoomindex]=wvals; + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); +} /* dialog_step_in_callback */ + +/********************************************************************** + FUNCTION: dialog_step_out_callback + *********************************************************************/ + +void +dialog_step_out_callback(GtkWidget * widget, gpointer data) +{ + double xdifferenz; + double ydifferenz; + if (zoomindex < zoommax) { + zooms[zoomindex]=wvals; + zoomindex++; + } + xdifferenz=wvals.xmax-wvals.xmin; + ydifferenz=wvals.ymax-wvals.ymin; + wvals.xmin-=1.0/4.0*xdifferenz; + wvals.ymin-=1.0/4.0*ydifferenz; + wvals.xmax+=1.0/4.0*xdifferenz; + wvals.ymax+=1.0/4.0*ydifferenz; + zooms[zoomindex]=wvals; + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); +} /* dialog_step_out_callback */ + +/********************************************************************** + FUNCTION: explorer_logo_ok_callback + *********************************************************************/ + +void +explorer_logo_ok_callback(GtkWidget * widget, gpointer data) +{ + gtk_widget_set_sensitive(maindlg, TRUE); + gtk_widget_destroy(logodlg); +} + +/********************************************************************** + FUNCTION: explorer_about_callback + *********************************************************************/ + +void +explorer_about_callback(GtkWidget * widget, gpointer data) +{ + gtk_widget_set_sensitive(maindlg, FALSE); + explorer_logo_dialog(); +} + +/********************************************************************** + FUNCTION: explorer_toggle_update + *********************************************************************/ + +void +explorer_toggle_update(GtkWidget * widget, + gpointer data) +{ + int *toggle_val; + + toggle_val = (int *) data; + + if (GTK_TOGGLE_BUTTON(widget)->active) + *toggle_val = TRUE; + else + *toggle_val = FALSE; + + if (do_redsinus) + wvals.redmode = SINUS; + else if (do_redcosinus) + wvals.redmode = COSINUS; + else if (do_rednone) + wvals.redmode = NONE; + + if (do_greensinus) + wvals.greenmode = SINUS; + else if (do_greencosinus) + wvals.greenmode = COSINUS; + else if (do_greennone) + wvals.greenmode = NONE; + + if (do_bluesinus) + wvals.bluemode = SINUS; + else if (do_bluecosinus) + wvals.bluemode = COSINUS; + else if (do_bluenone) + wvals.bluemode = NONE; + + if (do_colormode1) + wvals.colormode = 0; + else if (do_colormode2) + wvals.colormode = 1; + + if (do_english) + wvals.language = 0; + else if (do_french) + wvals.language = 1; + else if (do_german) + wvals.language = 2; + + + if (do_type0) + wvals.fractaltype = 0; + else if (do_type1) + wvals.fractaltype = 1; + else if (do_type2) + wvals.fractaltype = 2; + else if (do_type3) + wvals.fractaltype = 3; + else if (do_type4) + wvals.fractaltype = 4; + else if (do_type5) + wvals.fractaltype = 5; + else if (do_type6) + wvals.fractaltype = 6; + else if (do_type7) + wvals.fractaltype = 7; + else if (do_type8) + wvals.fractaltype = 8; + + set_cmap_preview(); + dialog_update_preview(); +} + +/********************************************************************** + FUNCTION: dialog_scale_update + *********************************************************************/ + +void +dialog_scale_update(GtkAdjustment * adjustment, gdouble * value) +{ + GtkWidget *entry; + char buf[256]; + + if (*value != adjustment->value) { + *value = adjustment->value; + + entry = gtk_object_get_user_data(GTK_OBJECT(adjustment)); + sprintf(buf, "%0.15f", *value); + + gtk_signal_handler_block_by_data(GTK_OBJECT(entry), value); + gtk_entry_set_text(GTK_ENTRY(entry), buf); + gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), value); + + dialog_update_preview(); + } +} /* dialog_scale_update */ + +/********************************************************************** + FUNCTION: dialog_scale_int_update + *********************************************************************/ + +void +dialog_scale_int_update(GtkAdjustment * adjustment, gdouble * value) +{ + GtkWidget *entry; + char buf[256]; + + if (*value != adjustment->value) { + *value = adjustment->value; + + entry = gtk_object_get_user_data(GTK_OBJECT(adjustment)); + sprintf(buf, "%i", (int) *value); + + gtk_signal_handler_block_by_data(GTK_OBJECT(entry), value); + gtk_entry_set_text(GTK_ENTRY(entry), buf); + gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), value); + set_cmap_preview(); + dialog_update_preview(); + } +} /* dialog_scale_int_update */ + +/********************************************************************** + FUNCTION: dialog_entry_update + *********************************************************************/ + +void +dialog_entry_update(GtkWidget * widget, gdouble * value) +{ + GtkAdjustment *adjustment; + gdouble new_value; + + new_value = atof(gtk_entry_get_text(GTK_ENTRY(widget))); + + if (*value != new_value) { + adjustment = gtk_object_get_user_data(GTK_OBJECT(widget)); + + if ((new_value >= adjustment->lower) && + (new_value <= adjustment->upper)) { + *value = new_value; + adjustment->value = new_value; + + gtk_signal_emit_by_name(GTK_OBJECT(adjustment), "value_changed"); + + dialog_update_preview(); + } + } +} /* dialog_entry_update */ diff --git a/plug-ins/FractalExplorer/Dialogs.h b/plug-ins/FractalExplorer/Dialogs.h new file mode 100644 index 0000000000..42e4a9320b --- /dev/null +++ b/plug-ins/FractalExplorer/Dialogs.h @@ -0,0 +1,2304 @@ +/********************************************************************** + FUNCTION: explorer_dialog + *********************************************************************/ + +/* void gtk_entry_adjust_scroll ( GtkEntry* ); */ + + +gint +explorer_dialog(void) +{ + GtkWidget *dialog, + *top_table, + *text, + *top_table2, + *frame, + *frame2, + *frame3, + *toggle, + *toggle_vbox, + *toggle_vbox2, + *toggle_vbox3, + *notebook, + *hbox, + *table, + *table6, + *button; + gint argc; + gchar **argv; + guchar *color_cube; + GSList *redmode_group = NULL, + *greenmode_group = NULL, + *bluemode_group = NULL, + *language_group = NULL, + *colormode_group = NULL, + *type_group = NULL; + + do_redsinus = (wvals.redmode == SINUS); + do_redcosinus = (wvals.redmode == COSINUS); + do_rednone = (wvals.redmode == NONE); + do_greensinus = (wvals.greenmode == SINUS); + do_greencosinus = (wvals.greenmode == COSINUS); + do_greennone = (wvals.greenmode == NONE); + do_bluesinus = (wvals.bluemode == SINUS); + do_bluecosinus = (wvals.bluemode == COSINUS); + do_bluenone = (wvals.bluemode == NONE); + do_redinvert = (wvals.redinvert != FALSE); + do_greeninvert = (wvals.greeninvert != FALSE); + do_blueinvert = (wvals.blueinvert != FALSE); + do_colormode1 = (wvals.colormode == 0); + do_colormode2 = (wvals.colormode == 1); + do_type0 = (wvals.fractaltype == 0); + do_type1 = (wvals.fractaltype == 1); + do_type2 = (wvals.fractaltype == 2); + do_type3 = (wvals.fractaltype == 3); + do_type4 = (wvals.fractaltype == 4); + do_type5 = (wvals.fractaltype == 5); + do_type6 = (wvals.fractaltype == 6); + do_type7 = (wvals.fractaltype == 7); + do_type8 = (wvals.fractaltype == 8); + + do_english = (wvals.language == 0); + do_french = (wvals.language == 1); + do_german = (wvals.language == 2); + + argc = 1; + argv = g_new(gchar *, 1); + argv[0] = g_strdup("fractalexplorer"); + + gtk_init(&argc, &argv); + + plug_in_parse_fractalexplorer_path(); + + gtk_preview_set_gamma(gimp_gamma()); + gtk_preview_set_install_cmap(gimp_install_cmap()); + color_cube = gimp_color_cube(); + gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]); + + gtk_widget_set_default_visual(gtk_preview_get_visual()); + gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + + wint.wimage = g_malloc(preview_width * preview_height * 3 * sizeof(guchar)); + elements = g_malloc(sizeof(DialogElements)); + + explorer_load_dialog(); + + dialog = maindlg = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(dialog), "Fractal Explorer "); + gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_NONE); + gtk_container_set_border_width(GTK_CONTAINER(dialog), 0); + gtk_signal_connect(GTK_OBJECT(dialog), "destroy", + (GtkSignalFunc) dialog_close_callback, + NULL); + + top_table = gtk_table_new(4, 5, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(top_table), 4); + gtk_table_set_row_spacings(GTK_TABLE(top_table), 10); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), top_table, FALSE, FALSE, 0); + gtk_widget_show(top_table); + + /* Tool-Tips */ + + /* use black as foreground: */ + tips = gtk_tooltips_new(); + tips_fg.red = 0; + tips_fg.green = 0; + tips_fg.blue = 0; + /* postit yellow (khaki) as background: */ + gdk_color_alloc(gtk_widget_get_colormap(top_table), &tips_fg); + tips_bg.red = 61669; + tips_bg.green = 59113; + tips_bg.blue = 35979; + gdk_color_alloc(gtk_widget_get_colormap(top_table), &tips_bg); + gtk_tooltips_set_colors(tips, &tips_bg, &tips_fg); + + /* Preview */ + + frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); + gtk_table_attach(GTK_TABLE(top_table), frame, 0, 1, 0, 1, 0, 0, 0, 0); + gtk_widget_show(frame); + + wint.preview = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(wint.preview), preview_width, preview_height); + gtk_container_add(GTK_CONTAINER(frame), wint.preview); + gtk_signal_connect(GTK_OBJECT(wint.preview), "button_press_event", + (GtkSignalFunc) preview_button_press_event, NULL); + gtk_signal_connect(GTK_OBJECT(wint.preview), "button_release_event", + (GtkSignalFunc) preview_button_release_event, NULL); + gtk_signal_connect(GTK_OBJECT(wint.preview), "motion_notify_event", + (GtkSignalFunc) preview_motion_notify_event, NULL); + gtk_signal_connect(GTK_OBJECT(wint.preview), "leave_notify_event", + (GtkSignalFunc) preview_leave_notify_event, NULL); + gtk_signal_connect(GTK_OBJECT(wint.preview), "enter_notify_event", + (GtkSignalFunc) preview_enter_notify_event, NULL); + gtk_widget_set_events(wint.preview, GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK + | GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK); + gtk_widget_show(wint.preview); + + /* Create notebook */ + notebook = gtk_notebook_new (); + gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP); + gtk_table_attach(GTK_TABLE(top_table), notebook, 4, 5, 0, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show (notebook); + + + /* Controls */ + frame2 = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame2), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (frame2), 10); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame2, + gtk_label_new (msg[lng][MSG_FRACTALOPTIONS])); + gtk_widget_show (frame2); + + toggle_vbox2 = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox2), 0); + gtk_container_add(GTK_CONTAINER(frame2), toggle_vbox2); + gtk_widget_show(toggle_vbox2); + + top_table2 = gtk_table_new(5, 5, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(top_table2), 10); + gtk_table_set_row_spacings(GTK_TABLE(top_table2), 0); + gtk_box_pack_start(GTK_BOX(toggle_vbox2), top_table2, FALSE, FALSE, 0); + gtk_widget_show(top_table2); + + frame = gtk_frame_new(msg[lng][MSG_PARAMETERS]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (frame), 0); + gtk_table_attach(GTK_TABLE(top_table2), frame, 0, 4, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 0); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + + table = gtk_table_new(9, 5, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(table), 5); + gtk_table_set_row_spacings(GTK_TABLE(table), 0); + gtk_box_pack_start(GTK_BOX(toggle_vbox), table, FALSE, FALSE, 0); + gtk_widget_show(table); + dialog_create_value("XMIN", GTK_TABLE(table), 0, &wvals.xmin, -3, 3, msg[lng][MSG_XMIN], &(elements->xmin)); + dialog_create_value("XMAX", GTK_TABLE(table), 1, &wvals.xmax, -3, 3, msg[lng][MSG_XMAX], &(elements->xmax)); + dialog_create_value("YMIN", GTK_TABLE(table), 2, &wvals.ymin, -3, 3, msg[lng][MSG_YMIN], &(elements->ymin)); + dialog_create_value("YMAX", GTK_TABLE(table), 3, &wvals.ymax, -3, 3, msg[lng][MSG_YMAX], &(elements->ymax)); + dialog_create_value("ITER", GTK_TABLE(table), 4, &wvals.iter, 0, 1000, msg[lng][MSG_ITER], &(elements->iter)); + dialog_create_value("CX", GTK_TABLE(table), 5, &wvals.cx, -2.5, 2.5, msg[lng][MSG_CX], &(elements->cx)); + dialog_create_value("CY", GTK_TABLE(table), 6, &wvals.cy, -2.5, 2.5, msg[lng][MSG_CY], &(elements->cy)); + + + button = gtk_button_new(); + gtk_table_attach(GTK_TABLE(table), button, 1, 2, 7, 8, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + text = gtk_label_new(msg[lng][MSG_RESET]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_reset_callback, + dialog); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_RESET_PARAM_COMMENT]); + + button = gtk_button_new(); + text = gtk_label_new(msg[lng][MSG_LOAD]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_table_attach(GTK_TABLE(table), button, 0, 1, 7, 8, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) load_button_press, + dialog); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_LOADCOMMENT]); + + button = gtk_button_new(); + gtk_table_attach(GTK_TABLE(table), button, 2, 3, 7, 8, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + text = gtk_label_new(msg[lng][MSG_SAVE]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_save_callback, + dialog); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_SAVECOMMENT]); + + + gtk_widget_show(table); + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + +/* Fractal type toggle box */ + frame = gtk_frame_new(msg[lng][MSG_FRACTALTYPE]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(top_table2), frame, 0, 4, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + + hbox = gtk_hbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(hbox), 0); + gtk_container_add(GTK_CONTAINER(frame), hbox); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), toggle_vbox, FALSE, FALSE, 0); + + toggle = elements->type_mandelbrot = gtk_radio_button_new_with_label(type_group, "Mandelbrot"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type0); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type0); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Mandelbrot"); + + toggle = elements->type_julia = gtk_radio_button_new_with_label(type_group, "Julia"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type1); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type1); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Julia"); + + toggle = elements->type_barnsley1 = gtk_radio_button_new_with_label(type_group, "Barnsley 1"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type2); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type2); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Barnsley"); + + gtk_widget_show(toggle_vbox); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), toggle_vbox, FALSE, FALSE, 0); + + toggle = elements->type_barnsley2 = gtk_radio_button_new_with_label(type_group, "Barnsley 2"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type3); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type3); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Barnsley 2"); + + toggle = elements->type_barnsley3 = gtk_radio_button_new_with_label(type_group, "Barnsley 3"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type4); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type4); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Barnsley 3"); + + toggle = elements->type_spider = gtk_radio_button_new_with_label(type_group, "Spider"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type5); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type5); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Spider"); + + gtk_widget_show(toggle_vbox); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), toggle_vbox, FALSE, FALSE, 0); + + toggle = elements->type_manowar = gtk_radio_button_new_with_label(type_group, "Man'o'war"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type6); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type6); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Man'o'war"); + + toggle = elements->type_lambda = gtk_radio_button_new_with_label(type_group, "Lambda"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type7); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type7); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Lambda"); + + toggle = elements->type_sierpinski = gtk_radio_button_new_with_label(type_group, "Sierpinski"); + type_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_type8); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_type8); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Sierpinski"); + + gtk_widget_show(toggle_vbox); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 5); + + gtk_box_pack_start(GTK_BOX(hbox), toggle_vbox, TRUE, TRUE, 0); + + + gtk_widget_show(toggle_vbox); + gtk_widget_show(hbox); + gtk_widget_show(frame); + + frame = gtk_frame_new(msg[lng][MSG_PREVIEW]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(top_table), frame, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 5); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + + toggle = gtk_check_button_new_with_label(msg[lng][MSG_REALTIMEPREVIEW]); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &wvals.alwayspreview); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), wvals.alwayspreview); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_REDRAWCOMMENT]); + + button = gtk_button_new(); + text = gtk_label_new(msg[lng][MSG_REDRAW]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_redraw_callback, + dialog); + gtk_box_pack_start(GTK_BOX(toggle_vbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_REDRAWPREVIEW]); + + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + + frame = gtk_frame_new(msg[lng][MSG_ZOOMOPTS]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(top_table), frame, 0, 1, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 5); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + + button = gtk_button_new(); + text = gtk_label_new(msg[lng][MSG_UNDOZOOM]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_undo_zoom_callback, + dialog); + gtk_box_pack_start(GTK_BOX(toggle_vbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + set_tooltip(tips, button,msg[lng][MSG_UNDOCOMMENT]); + + button = gtk_button_new(); + text = gtk_label_new(msg[lng][MSG_REDOZOOM]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_redo_zoom_callback, + dialog); + gtk_box_pack_start(GTK_BOX(toggle_vbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_REDOCOMMENT]); + + button = gtk_button_new(); + text = gtk_label_new(msg[lng][MSG_STEPIN]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_step_in_callback, + dialog); + gtk_box_pack_start(GTK_BOX(toggle_vbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_STEPIN]); + + button = gtk_button_new(); + text = gtk_label_new(msg[lng][MSG_STEPOUT]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_step_out_callback, + dialog); + gtk_box_pack_start(GTK_BOX(toggle_vbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_STEPOUT]); + + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + + frame2 = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame2), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (frame2), 10); + gtk_widget_show(frame2); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame2, + gtk_label_new (msg[lng][MSG_COLOROPTS])); + + toggle_vbox2 = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox2), 0); + gtk_container_add(GTK_CONTAINER(frame2), toggle_vbox2); + gtk_widget_show(toggle_vbox2); + + top_table2 = gtk_table_new(5, 5, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(top_table2), 10); + gtk_table_set_row_spacings(GTK_TABLE(top_table2), 0); + gtk_box_pack_start(GTK_BOX(toggle_vbox2), top_table2, FALSE, FALSE, 0); + gtk_widget_show(top_table2); + + frame = gtk_frame_new(msg[lng][MSG_COLORDENSITY]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(top_table2), frame, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show(frame); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 0); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + gtk_widget_show(toggle_vbox); + + table6 = gtk_table_new(3, 3, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(table6), 0); + gtk_table_set_row_spacings(GTK_TABLE(table6), 0); + gtk_box_pack_start(GTK_BOX(toggle_vbox), table6, FALSE, FALSE, 0); + gtk_widget_show(table6); + dialog_create_int_value(msg[lng][MSG_RED], GTK_TABLE(table6), 0, &wvals.redstretch, 0, 128, msg[lng][MSG_REDINTENSITY], &(elements->red)); + dialog_create_int_value(msg[lng][MSG_GREEN], GTK_TABLE(table6), 1, &wvals.greenstretch, 0, 128, msg[lng][MSG_GREENINTENSITY], &(elements->green)); + dialog_create_int_value(msg[lng][MSG_BLUE], GTK_TABLE(table6), 2, &wvals.bluestretch, 0, 128, msg[lng][MSG_BLUEINTENSITY], &(elements->blue)); + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + + frame3 = gtk_frame_new(msg[lng][MSG_COLORFUNCTION]); + gtk_frame_set_shadow_type(GTK_FRAME(frame3), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(top_table2), frame3, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show(frame3); + + toggle_vbox3 = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox3), 0); + gtk_container_add(GTK_CONTAINER(frame3), toggle_vbox3); + gtk_widget_show(toggle_vbox3); + + table6 = gtk_table_new(4, 4, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(table6), 0); + gtk_table_set_row_spacings(GTK_TABLE(table6), 0); + gtk_box_pack_start(GTK_BOX(toggle_vbox3), table6, FALSE, FALSE, 0); + gtk_widget_show(table6); + + frame = gtk_frame_new(msg[lng][MSG_RED]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(table6), frame, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show(frame); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 0); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + gtk_widget_show(toggle_vbox); + + toggle = elements->redmodesin = gtk_radio_button_new_with_label(redmode_group, msg[lng][MSG_SINE]); + redmode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_redsinus); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_redsinus); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_SINECOMMENT]); + + toggle = elements->redmodecos = gtk_radio_button_new_with_label(redmode_group, msg[lng][MSG_COSINE]); + redmode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_redcosinus); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_redcosinus); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_COSINECOMMENT]); + + toggle = elements->redmodenone = gtk_radio_button_new_with_label(redmode_group, msg[lng][MSG_NONE]); + redmode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_rednone); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_rednone); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_NONECOMMENT]); + + elements->redinvert = toggle = gtk_check_button_new_with_label(msg[lng][MSG_INVERSION]); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &wvals.redinvert); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), wvals.redinvert); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_INVERSIONCOMMENT]); + + + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + +/* Greenmode toggle box */ + frame = gtk_frame_new(msg[lng][MSG_GREEN]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(table6), frame, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show(frame); + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 0); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + gtk_widget_show(toggle_vbox); + + toggle = elements->greenmodesin = gtk_radio_button_new_with_label(greenmode_group, msg[lng][MSG_SINE]); + greenmode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_greensinus); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_greensinus); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_SINECOMMENT]); + + toggle = elements->greenmodecos = gtk_radio_button_new_with_label(greenmode_group, msg[lng][MSG_COSINE]); + greenmode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_greencosinus); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_greencosinus); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_COSINECOMMENT]); + + toggle = elements->greenmodenone = gtk_radio_button_new_with_label(greenmode_group, msg[lng][MSG_NONE]); + greenmode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_greennone); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_greennone); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_NONECOMMENT]); + + elements->greeninvert = toggle = gtk_check_button_new_with_label(msg[lng][MSG_INVERSION]); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &wvals.greeninvert); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), wvals.greeninvert); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_INVERSIONCOMMENT]); + + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + +/* Bluemode toggle box */ + frame = gtk_frame_new(msg[lng][MSG_BLUE]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(table6), frame, 2, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + gtk_widget_show(frame); + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 0); + gtk_container_add(GTK_CONTAINER(frame), toggle_vbox); + gtk_widget_show(toggle_vbox); + + toggle = elements->bluemodesin = gtk_radio_button_new_with_label(bluemode_group, msg[lng][MSG_SINE]); + bluemode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_bluesinus); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_bluesinus); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_SINECOMMENT]); + + toggle = elements->bluemodecos = gtk_radio_button_new_with_label(bluemode_group, msg[lng][MSG_COSINE]); + bluemode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_bluecosinus); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_bluecosinus); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_COSINECOMMENT]); + + toggle = elements->bluemodenone = gtk_radio_button_new_with_label(bluemode_group, msg[lng][MSG_NONE]); + bluemode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_bluenone); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_bluenone); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_NONECOMMENT]); + + + elements->blueinvert = toggle = gtk_check_button_new_with_label(msg[lng][MSG_INVERSION]); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &wvals.blueinvert); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), wvals.blueinvert); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_INVERSIONCOMMENT]); + + gtk_widget_show(toggle_vbox); + gtk_widget_show(frame); + gtk_widget_show(toggle_vbox3); + gtk_widget_show(frame3); + +/* Colormode toggle box */ + + frame = gtk_frame_new(msg[lng][MSG_COLORMODE]); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_table_attach(GTK_TABLE(top_table2), frame, 0, 1, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 3, 3); + hbox = gtk_hbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(hbox), 0); + gtk_container_add(GTK_CONTAINER(frame), hbox); + toggle_vbox = gtk_vbox_new(FALSE, 0); + + gtk_box_pack_start(GTK_BOX(hbox), toggle_vbox, FALSE, FALSE, 10); + toggle = elements->colormode0 = gtk_radio_button_new_with_label(colormode_group, msg[lng][MSG_ASSPECIFIED]); + colormode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_colormode1); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_colormode1); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_ASSPECIFIEDCOMMENT]); + + + toggle = elements->colormode1 = gtk_radio_button_new_with_label(colormode_group, msg[lng][MSG_APPLYGRADIENT]); + colormode_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_colormode2); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_colormode2); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, msg[lng][MSG_APPLYGRADIENTCOMMENT]); + gtk_widget_show(toggle_vbox); + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(hbox), toggle_vbox, TRUE, TRUE, 10); + cmap_preview = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(cmap_preview), 32, 32); + gtk_box_pack_start(GTK_BOX(toggle_vbox), cmap_preview, FALSE, FALSE, 10); + gtk_widget_show(cmap_preview); + gtk_widget_show(toggle_vbox); + gtk_widget_show(hbox); + gtk_widget_show(frame); + + frame= add_objects_list (); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (frame), 10); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, + gtk_label_new (msg[lng][MSG_FRACTALPRESETS])); + gtk_widget_show (frame); + + frame= add_gradients_list (); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (frame), 10); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, + gtk_label_new (msg[lng][MSG_GRADIENTPRESETS])); + gtk_widget_show (frame); + + frame2 = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame2), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (frame2), 10); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame2, + gtk_label_new (msg[lng][MSG_GENERALOPTIONS])); + + toggle_vbox2 = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox2), 10); + gtk_container_add(GTK_CONTAINER(frame2), toggle_vbox2); + gtk_widget_show(toggle_vbox2); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 10); + gtk_box_pack_start(GTK_BOX(toggle_vbox2), toggle_vbox, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0); + gtk_widget_show(toggle_vbox); + + toggle = gtk_radio_button_new_with_label(language_group, "English"); + language_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_english); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_english); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "This sets the default language to English. Note that you will have to restart the plug-in!"); + + toggle = gtk_radio_button_new_with_label(language_group, "Français"); + language_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_french); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_french); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Cette option active les messages en français. Il vous faudra redémarrer le programme pour que les changements prennent effet."); + + toggle = gtk_radio_button_new_with_label(language_group, "Deutsch"); + language_group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); + gtk_box_pack_start(GTK_BOX(toggle_vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + (GtkSignalFunc) explorer_toggle_update, + &do_german); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(toggle), do_german); + gtk_widget_show(toggle); + set_tooltip(tips, toggle, "Diese Option stellt die deutschen Texte ein. Damit diese jedoch angezeigt werden, ist ein Neustart des Programms noetig."); + gtk_widget_show(toggle_vbox); + + toggle_vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(toggle_vbox), 10); + gtk_box_pack_start(GTK_BOX(toggle_vbox2), toggle_vbox, FALSE, FALSE, 0); + gtk_widget_show(toggle_vbox); + + button = gtk_button_new(); + gtk_box_pack_start(GTK_BOX(toggle_vbox), button, FALSE, FALSE, 0); + text = gtk_label_new(msg[lng][MSG_SAVELANGUAGE]); + gtk_misc_set_alignment(GTK_MISC(text), 0.5, 0.5); + gtk_container_add(GTK_CONTAINER(button), text); + gtk_widget_show(text); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_savelanguage_callback, + dialog); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_SAVELANGUAGE_COMMENT]); + + gtk_widget_show(toggle_vbox); + + + gtk_widget_show (frame2); + + /* Buttons */ + + gtk_container_set_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5); + + button = gtk_button_new_with_label(msg[lng][MSG_OK]); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_ok_callback, + dialog); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0); + gtk_widget_grab_default(button); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_STARTCALC]); + + button = gtk_button_new_with_label(msg[lng][MSG_CANCEL]); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_cancel_callback, + dialog); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_MAINDLGCANCEL]); + + button = gtk_button_new_with_label(msg[lng][MSG_ABOUT]); + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) explorer_about_callback, button); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), + button, TRUE, TRUE, 0); + gtk_widget_show(button); + set_tooltip(tips, button, msg[lng][MSG_ABOUTCOMMENT]); + + /* Done */ + + /* Popup for list area: Not yet fully implemented + + fractalexplorer_op_menu_create(maindlg); + + */ + gtk_signal_disconnect_by_data (GTK_OBJECT (loaddlg), loaddlg); + gtk_widget_destroy (loaddlg); + + gtk_widget_show(dialog); + ready_now = TRUE; + + set_cmap_preview(); + + dialog_update_preview(); + gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_NONE); + gtk_main(); + gdk_flush(); + if (the_tile != NULL) { + gimp_tile_unref(the_tile, FALSE); + the_tile = NULL; + } + g_free(wint.wimage); + + return wint.run; +} /* explorer_dialog */ + +/********************************************************************** + FUNCTION: dialog_update_preview + *********************************************************************/ + +void +dialog_update_preview() +{ + double left, + right, + bottom, + top; + double dx, + dy, + cx, + cy; + int px, + py; + int xcoord, + ycoord; + int iteration; + guchar *p_ul, + *p; + double a, + b, + x, + y, + oldx, + oldy, + foldxinitx, + foldxinity, + tempsqrx, + tempsqry, + tmpx=0, + tmpy=0, + foldyinitx, + foldyinity, + xx=0; + int zaehler, + color; + + if (NULL == wint.preview) + return; + + if ((ready_now) && (wvals.alwayspreview)) { +/* gtk_widget_set_sensitive(maindlg, FALSE); */ + left = sel_x1; + right = sel_x2 - 1; + bottom = sel_y2 - 1; + top = sel_y1; + dx = (right - left) / (preview_width - 1); + dy = (bottom - top) / (preview_height - 1); + + xmin = wvals.xmin; + xmax = wvals.xmax; + ymin = wvals.ymin; + ymax = wvals.ymax; + cx = wvals.cx; + cy = wvals.cy; + xbild = preview_width; + ybild = preview_height; + xdiff = (xmax - xmin) / xbild; + ydiff = (ymax - ymin) / ybild; + + py = 0; + + p_ul = wint.wimage; + iteration = (int) wvals.iter; + for (ycoord = 0; ycoord < preview_height; ycoord++) { + px = 0; + + for (xcoord = 0; xcoord < preview_width; xcoord++) { + a = (double) xmin + (double) xcoord *xdiff; + b = (double) ymin + (double) ycoord *ydiff; + + if (wvals.fractaltype!=0) { + tmpx=x = a; + tmpy=y = b; + } else { + x = 0; + y = 0; + } + for (zaehler = 0; (zaehler < iteration) && ((x * x + y * y) < 4); zaehler++) { + oldx=x; oldy=y; + if (wvals.fractaltype==1) { + /* Julia */ + xx = x * x - y * y + cx; + y = 2.0 * x * y + cy; + } else if (wvals.fractaltype==0) { + /*Mandelbrot*/ + xx = x * x - y * y + a; + y = 2.0 * x * y + b; + } else if (wvals.fractaltype==2) { +/* Barnsley M1 */ + foldxinitx = oldx * cx; + foldyinity = oldy * cy; + foldxinity = oldx * cy; + foldyinitx = oldy * cx; + /* orbit calculation */ + if(oldx >= 0) + { + xx = (foldxinitx - cx - foldyinity); + y = (foldyinitx - cy + foldxinity); + } + else + { + xx = (foldxinitx + cx - foldyinity); + y = (foldyinitx + cy + foldxinity); + } + } else if (wvals.fractaltype==3) { +/* Barnsley Unnamed */ + + foldxinitx = oldx * cx; + foldyinity = oldy * cy; + foldxinity = oldx * cy; + foldyinitx = oldy * cx; + /* orbit calculation */ + if(foldxinity + foldyinitx >= 0) + { + xx = foldxinitx - cx - foldyinity; + y = foldyinitx - cy + foldxinity; + } + else + { + xx = foldxinitx + cx - foldyinity; + y = foldyinitx + cy + foldxinity; + } + } else if (wvals.fractaltype==4) { + /*Barnsley 1*/ + foldxinitx = oldx * oldx; + foldyinity = oldy * oldy; + foldxinity = oldx * oldy; + /* orbit calculation */ + if(oldx > 0) + { + xx = foldxinitx - foldyinity - 1.0; + y = foldxinity * 2; + } + else + { + xx = foldxinitx - foldyinity -1.0 + cx * oldx; + y = foldxinity * 2; + y += cy * oldx; + } + } else if (wvals.fractaltype==5) { + /* Spider(XAXIS) { c=z=pixel: z=z*z+c; c=c/2+z, |z|<=4 } */ + xx = x*x - y*y + tmpx + cx; + y = 2 * oldx * oldy + tmpy +cy; + tmpx = tmpx/2 + xx; + tmpy = tmpy/2 + y; + } else if (wvals.fractaltype==6) { +/* ManOWarfpFractal() */ + xx = x*x - y*y + tmpx + cx; + y = 2.0 * x * y + tmpy + cy; + tmpx = oldx; + tmpy = oldy; + } else if (wvals.fractaltype==7) { +/* Lambda */ + tempsqrx=x*x; + tempsqry=y*y; + tempsqrx = oldx - tempsqrx + tempsqry; + tempsqry = -(oldy * oldx); + tempsqry += tempsqry + oldy; + xx = cx * tempsqrx - cy * tempsqry; + y = cx * tempsqry + cy * tempsqrx; + } else if (wvals.fractaltype==8) { +/* Sierpinski */ + xx = oldx + oldx; + y = oldy + oldy; + if(oldy > .5) + y = y - 1; + else if (oldx > .5) + xx = xx - 1; + } + x = xx; + } + color = (int) (255.0 * zaehler / iteration); + p_ul[0] = colormap[color][0]; + p_ul[1] = colormap[color][1]; + p_ul[2] = colormap[color][2]; + p_ul += 3; + px += 1; + } /* for */ + py += 1; + } /* for */ + p = wint.wimage; + + for (y = 0; y < preview_height; y++) { + gtk_preview_draw_row(GTK_PREVIEW(wint.preview), p, 0, y, preview_width); + p += preview_width * 3; + } /* for */ + gtk_widget_draw(wint.preview, NULL); + gdk_flush(); +/* gtk_widget_set_sensitive(maindlg, TRUE); */ + } +} /* dialog_update_preview */ + +/********************************************************************** + FUNCTION: dialog_create_value + *********************************************************************/ + +void +dialog_create_value(char *title, GtkTable * table, int row, gdouble * value, + int left, int right, const char *desc, scaledata * scalevalues) +{ + GtkWidget *label; + GtkWidget *scale; + GtkWidget *entry; + GtkObject *scale_data; + char buf[256]; + scaledata *pppp; + + pppp = scalevalues; + + label = gtk_label_new(title); + gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); + gtk_table_attach(table, label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 4, 0); + gtk_widget_show(label); + + scale_data = gtk_adjustment_new(*value, left, right, + (right - left) / 1000, + (right - left) / 1000, + 0); + pppp->data = GTK_ADJUSTMENT(scale_data); + gtk_signal_connect(GTK_OBJECT(scale_data), "value_changed", + (GtkSignalFunc) dialog_scale_update, + value); + + scale = gtk_hscale_new(GTK_ADJUSTMENT(scale_data)); + gtk_widget_set_usize(scale, SCALE_WIDTH, 0); + gtk_table_attach(table, scale, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_scale_set_draw_value(GTK_SCALE(scale), FALSE); + gtk_scale_set_digits(GTK_SCALE(scale), 3); + gtk_range_set_update_policy(GTK_RANGE(scale), GTK_UPDATE_CONTINUOUS); + gtk_widget_show(scale); + set_tooltip(tips, scale, desc); + + entry = gtk_entry_new(); + pppp->text = entry; + gtk_object_set_user_data(GTK_OBJECT(entry), scale_data); + gtk_object_set_user_data(scale_data, entry); + gtk_widget_set_usize(entry, ENTRY_WIDTH, 0); + sprintf(buf, "%0.15f", *value); + gtk_entry_set_text(GTK_ENTRY(entry), buf); + gtk_entry_set_position (GTK_ENTRY (entry), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (entry)); */ + gtk_signal_connect(GTK_OBJECT(entry), "changed", + (GtkSignalFunc) dialog_entry_update, + value); + gtk_table_attach(GTK_TABLE(table), entry, 2, 3, row, row + 1, 0, 0, 4, 0); + gtk_widget_show(entry); + set_tooltip(tips, entry, desc); + +} /* dialog_create_value */ + +/********************************************************************** + FUNCTION: dialog_create_int_value + *********************************************************************/ + +void +dialog_create_int_value(char *title, GtkTable * table, int row, gdouble * value, + int left, int right, const char *desc, scaledata * scalevalues) +{ + GtkWidget *label; + GtkWidget *scale; + GtkWidget *entry; + GtkObject *scale_data; + char buf[256]; + scaledata *pppp; + + pppp = scalevalues; + + label = gtk_label_new(title); + gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); + gtk_table_attach(table, label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 4, 0); + gtk_widget_show(label); + + scale_data = gtk_adjustment_new(*value, left, right, + (right - left) / 200, + (right - left) / 200, + 0); + pppp->data = GTK_ADJUSTMENT(scale_data); + gtk_signal_connect(GTK_OBJECT(scale_data), "value_changed", + (GtkSignalFunc) dialog_scale_int_update, + value); + + scale = gtk_hscale_new(GTK_ADJUSTMENT(scale_data)); + gtk_widget_set_usize(scale, SCALE_WIDTH, 0); + gtk_table_attach(table, scale, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_scale_set_draw_value(GTK_SCALE(scale), FALSE); + gtk_scale_set_digits(GTK_SCALE(scale), 3); + gtk_range_set_update_policy(GTK_RANGE(scale), GTK_UPDATE_CONTINUOUS); + gtk_widget_show(scale); + set_tooltip(tips, scale, desc); + + entry = gtk_entry_new(); + pppp->text = entry; + gtk_object_set_user_data(GTK_OBJECT(entry), scale_data); + gtk_object_set_user_data(scale_data, entry); + gtk_widget_set_usize(entry, ENTRY_WIDTH - 20, 0); + sprintf(buf, "%i", (int) *value); + gtk_entry_set_text(GTK_ENTRY(entry), buf); + gtk_signal_connect(GTK_OBJECT(entry), "changed", + (GtkSignalFunc) dialog_entry_update, + value); + gtk_table_attach(GTK_TABLE(table), entry, 2, 3, row, row + 1, 0, 0, 4, 0); + gtk_widget_show(entry); + set_tooltip(tips, entry, desc); + +} /* dialog_create_int_value */ + +/********************************************************************** + FUNCTION: set_cmap_preview() + *********************************************************************/ + +void +set_cmap_preview() +{ + int i, + x, + y, + j; + guchar b[96]; + guchar c[GR_WIDTH*3]; + + if (NULL == cmap_preview) + return; + + if (NULL == cmap_preview_long) + return; + + if (NULL == cmap_preview_long2) + return; + + make_color_map(); + + for (y = 0; y < 32; y += 4) { + for (x = 0; x < 32; x++) { + i = x + (y / 4) * 32; + for (j = 0; j < 3; j++) + b[x * 3 + j] = colormap[i][j]; + } + gtk_preview_draw_row(GTK_PREVIEW(cmap_preview), b, 0, y, 32); + gtk_preview_draw_row(GTK_PREVIEW(cmap_preview), b, 0, y + 1, 32); + gtk_preview_draw_row(GTK_PREVIEW(cmap_preview), b, 0, y + 2, 32); + gtk_preview_draw_row(GTK_PREVIEW(cmap_preview), b, 0, y + 3, 32); + } + + for (x = 0; x < GR_WIDTH; x++) { + for (j = 0; j < 3; j++) + c[x * 3 + j] = colormap[(int)((float)x/(float)GR_WIDTH*256.0)][j]; + } + for (i=0; i<32; i++) + { + gtk_preview_draw_row(GTK_PREVIEW(cmap_preview_long), c, 0, i, GR_WIDTH); + } + for (i=0; i<32; i++) + { + gtk_preview_draw_row(GTK_PREVIEW(cmap_preview_long2), c, 0, i, GR_WIDTH); + } + gtk_widget_draw(cmap_preview, NULL); + gtk_widget_draw(cmap_preview_long, NULL); + gtk_widget_draw(cmap_preview_long2, NULL); +} + +/********************************************************************** + FUNCTION: make_color_map() + *********************************************************************/ + +void +make_color_map() +{ + int i, + j; + int r, + gr, + bl; + double *g = NULL; + double redstretch, + greenstretch, + bluestretch, + pi = atan(1) * 4; + + if (wvals.colormode) { + g = gimp_gradients_sample_uniform(256); + } + redstretch = wvals.redstretch; + greenstretch = wvals.greenstretch; + bluestretch = wvals.bluestretch; + for (i = 0; i < 256; i++) + if (wvals.colormode) { + for (j = 0; j < 3; j++) + colormap[i][j] = (int) (g[i * 4 + j] * 255.0); + } else { + r = gr = bl = i; + + switch (wvals.redmode) { + case SINUS: + r = (int) redstretch *(1.0 + sin((r / 128.0 - 1) * pi)); + break; + case COSINUS: + r = (int) redstretch *(1.0 + cos((r / 128.0 - 1) * pi)); + break; + case NONE: + r = (int)(redstretch *(r / 128.0)); + break; + default: + break; + } + + switch (wvals.greenmode) { + case SINUS: + gr = (int) greenstretch *(1.0 + sin((gr / 128.0 - 1) * pi)); + break; + case COSINUS: + gr = (int) greenstretch *(1.0 + cos((gr / 128.0 - 1) * pi)); + break; + case NONE: + gr = (int)(greenstretch *(gr / 128.0)); + break; + default: + break; + } + switch (wvals.bluemode) { + case SINUS: + bl = (int) bluestretch *(1.0 + sin((bl / 128.0 - 1) * pi)); + break; + case COSINUS: + bl = (int) bluestretch *(1.0 + cos((bl / 128.0 - 1) * pi)); + break; + case NONE: + bl = (int)(bluestretch *(bl / 128.0)); + break; + default: + break; + } + if (r == 256) { + r = 255; + } + if (gr == 256) { + gr = 255; + } + if (bl == 256) { + bl = 255; + } + if (wvals.redinvert) { + r = 255-r; + } + if (wvals.greeninvert) { + gr = 255-gr; + } + if (wvals.blueinvert) { + bl = 255-bl; + } + colormap[i][0] = r; + colormap[i][1] = gr; + colormap[i][2] = bl; + } + free(g); +} + +/********************************************************************** + FUNCTION: explorer_logo_dialog + *********************************************************************/ + +GtkWidget * +explorer_logo_dialog() +{ + GtkWidget *xdlg; + GtkWidget *xbutton; + GtkWidget *xlabel=NULL; + GtkWidget *xlogo_box; + GtkWidget *xpreview; + GtkWidget *xframe, + *xframe2, + *xframe3; + GtkWidget *xvbox; + GtkWidget *xhbox; + GtkWidget *vpaned; + #if 0 + GtkWidget *table; + GtkWidget *text; + GtkWidget *hscrollbar; + GtkWidget *vscrollbar; + #endif + guchar *temp, + *temp2; + unsigned char *datapointer; + gint y, + x; + + xdlg = logodlg = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(xdlg), msg[lng][MSG_ABOUT]); + gtk_window_position(GTK_WINDOW(xdlg), GTK_WIN_POS_NONE); + gtk_signal_connect(GTK_OBJECT(xdlg), "destroy", + (GtkSignalFunc) dialog_close_callback, + NULL); + + xbutton = gtk_button_new_with_label(msg[lng][MSG_OK]); + GTK_WIDGET_SET_FLAGS(xbutton, GTK_CAN_DEFAULT); + gtk_signal_connect(GTK_OBJECT(xbutton), "clicked", + (GtkSignalFunc) explorer_logo_ok_callback, + xdlg); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(xdlg)->action_area), + xbutton, TRUE, TRUE, 0); + gtk_widget_grab_default(xbutton); + gtk_widget_show(xbutton); + set_tooltip(tips, xbutton, msg[lng][MSG_ABOUTBOXOKCOMMENT]); + + xframe = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(xframe), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width(GTK_CONTAINER(xframe), 10); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(xdlg)->vbox), xframe, TRUE, TRUE, 0); + xvbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(xvbox), 10); + gtk_container_add(GTK_CONTAINER(xframe), xvbox); + + /* The logo frame & drawing area */ + xhbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(xvbox), xhbox, FALSE, TRUE, 0); + + xlogo_box = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(xhbox), xlogo_box, FALSE, FALSE, 0); + + xframe2 = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(xframe2), GTK_SHADOW_IN); + gtk_box_pack_start(GTK_BOX(xlogo_box), xframe2, FALSE, FALSE, 0); + + xpreview = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(xpreview), logo_width, logo_height); + temp = g_malloc((logo_width + 10) * 3); + datapointer = header_data+logo_width*logo_height-1; + for (y = 0; y < logo_height; y++) { + temp2 = temp; + for (x = 0; x < logo_width; x++) { + HEADER_PIXEL(datapointer, temp2); + temp2 += 3; + } + gtk_preview_draw_row(GTK_PREVIEW(xpreview), + temp, + 0, y, logo_width); + } + g_free(temp); + gtk_container_add(GTK_CONTAINER(xframe2), xpreview); + gtk_widget_show(xpreview); + gtk_widget_show(xframe2); + gtk_widget_show(xlogo_box); + gtk_widget_show(xhbox); + + xhbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(xvbox), xhbox, TRUE, TRUE, 0); + + vpaned = gtk_vpaned_new (); + gtk_box_pack_start(GTK_BOX(xhbox), vpaned, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER(vpaned), 0); + gtk_widget_show (vpaned); + + xframe3 = gtk_frame_new (NULL); +/* gtk_frame_set_shadow_type (GTK_FRAME(xframe3), GTK_SHADOW_IN); */ +/* gtk_widget_set_usize (xframe3, 20, 20); */ + gtk_paned_add1 (GTK_PANED (vpaned), xframe3); + gtk_widget_show (xframe3); +#if 0 + table = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacing (GTK_TABLE (table), 0, 0); + gtk_table_set_col_spacing (GTK_TABLE (table), 0, 0); + gtk_container_add(GTK_CONTAINER(xframe3), table); + gtk_widget_show (table); + + text = gtk_text_new (NULL, NULL); + gtk_table_attach (GTK_TABLE (table), text, 0, 1, 0, 1, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0); + gtk_widget_show (text); + + hscrollbar = gtk_hscrollbar_new (GTK_TEXT (text)->hadj); + gtk_table_attach (GTK_TABLE (table), hscrollbar, 0, 1, 1, 2, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_EXPAND| GTK_FILL | GTK_SHRINK, 0, 0); + gtk_widget_show (hscrollbar); + + vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj); + gtk_table_attach (GTK_TABLE (table), vscrollbar, 1, 2, 0, 1, + GTK_EXPAND| GTK_FILL | GTK_SHRINK, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0); + gtk_widget_show (vscrollbar); + + gtk_text_freeze (GTK_TEXT (text)); + + gtk_widget_realize (text); + + gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL, + "\nCotting Software Productions\n" + "Quellenstrasse 10\n" + "CH-8005 Zuerich (Switzerland)\n\n" + "cotting@multimania.com\n" + "http://www.multimania.com/cotting\n\n" + "Fractal Chaos Explorer\nPlug-In for the GIMP\n" + "Version 2.00 Beta 2 (Multilingual)\n" + , -1); + + gtk_text_thaw (GTK_TEXT (text)); +#endif + + xlabel = gtk_label_new("\nCotting Software Productions\n" + "Quellenstrasse 10\n" + "CH-8005 Zuerich (Switzerland)\n\n" + "cotting@multimania.com\n" + "http://www.multimania.com/cotting\n\n" + "Fractal Chaos Explorer\nPlug-In for the GIMP\n" + "Version 2.00 Beta 2 (Multilingual)\n"); + gtk_container_add(GTK_CONTAINER(xframe3), xlabel); + gtk_widget_show(xlabel); + + xframe3 = gtk_frame_new (NULL); +/* gtk_frame_set_shadow_type (GTK_FRAME(xframe3), GTK_SHADOW_IN); */ +/* gtk_widget_set_usize (xframe3, 20, 20); */ + gtk_paned_add2 (GTK_PANED (vpaned), xframe3); + gtk_widget_show (xframe3); + +#if 0 + table = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacing (GTK_TABLE (table), 0, 0); + gtk_table_set_col_spacing (GTK_TABLE (table), 0, 0); + gtk_container_add(GTK_CONTAINER(xframe3), table); + gtk_widget_show (table); + + text = gtk_text_new (NULL, NULL); + gtk_table_attach (GTK_TABLE (table), text, 0, 1, 0, 1, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0); + gtk_widget_show (text); + + hscrollbar = gtk_hscrollbar_new (GTK_TEXT (text)->hadj); + gtk_table_attach (GTK_TABLE (table), hscrollbar, 0, 1, 1, 2, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0); + gtk_widget_show (hscrollbar); + + vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj); + gtk_table_attach (GTK_TABLE (table), vscrollbar, 1, 2, 0, 1, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0); + gtk_widget_show (vscrollbar); + + gtk_text_freeze (GTK_TEXT (text)); + + gtk_widget_realize (text); + + gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL, + "\nContains code from:\n\n" + "Daniel Cotting\n\n" + "Peter Kirchgessner\n\n" + "Scott Draves\n\n" + "Andy Thomas\n\n" + "and the GIMP distribution.\n" + , -1); + + gtk_text_thaw (GTK_TEXT (text)); +#endif + + xlabel = gtk_label_new("\nContains code from:\n\n" + "Daniel Cotting\n\n" + "Peter Kirchgessner\n\n" + "Scott Draves\n\n" + "Andy Thomas\n\n" + "and the GIMP distribution.\n"); + gtk_container_add(GTK_CONTAINER(xframe3), xlabel); + gtk_widget_show(xlabel); + + gtk_widget_show(xhbox); + + gtk_widget_show(xvbox); + gtk_widget_show(xframe); + gtk_widget_show(xdlg); + + gtk_main(); + gdk_flush(); + return xdlg; +} + +/********************************************************************** + FUNCTION: explorer_load_dialog + *********************************************************************/ + +GtkWidget * +explorer_load_dialog() +{ + GtkWidget *xdlg; + + GtkWidget *xlabel; + GtkWidget *xlogo_box; + GtkWidget *xpreview; + GtkWidget *xframe, + *xframe2; + GtkWidget *xvbox; + GtkWidget *xhbox; + guchar *temp, + *temp2; + unsigned char *datapointer; + gint y, + x; + + xdlg = loaddlg = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(xdlg), "Loading..."); + gtk_window_position(GTK_WINDOW(xdlg), GTK_WIN_POS_NONE); + gtk_signal_connect(GTK_OBJECT(xdlg), "destroy", + (GtkSignalFunc) dialog_close_callback, + loaddlg); + + xframe = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(xframe), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width(GTK_CONTAINER(xframe), 10); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(xdlg)->vbox), xframe, TRUE, TRUE, 0); + xvbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(xvbox), 10); + gtk_container_add(GTK_CONTAINER(xframe), xvbox); + + /* The logo frame & drawing area */ + xhbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(xvbox), xhbox, FALSE, TRUE, 0); + + xlogo_box = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(xhbox), xlogo_box, FALSE, FALSE, 0); + + xframe2 = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(xframe2), GTK_SHADOW_IN); + gtk_box_pack_start(GTK_BOX(xlogo_box), xframe2, FALSE, FALSE, 0); + + xpreview = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(xpreview), logo_width, logo_height); + temp = g_malloc((logo_width + 10) * 3); + datapointer = header_data+logo_width*logo_height-1; + for (y = 0; y < logo_height; y++) { + temp2 = temp; + for (x = 0; x < logo_width; x++) { + HEADER_PIXEL(datapointer, temp2); + temp2 += 3; + } + gtk_preview_draw_row(GTK_PREVIEW(xpreview), + temp, + 0, y, logo_width); + } + g_free(temp); + gtk_container_add(GTK_CONTAINER(xframe2), xpreview); + gtk_widget_show(xpreview); + gtk_widget_show(xframe2); + gtk_widget_show(xlogo_box); + gtk_widget_show(xhbox); + + xhbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(xvbox), xhbox, TRUE, TRUE, 0); + xlabel = gtk_label_new("... Loading FractalExplorer ...\n" + "... Lade FractalExplorer ...\n" + "... Chargement de FractalExplorer ..."); + gtk_box_pack_start(GTK_BOX(xhbox), xlabel, TRUE, FALSE, 0); + gtk_widget_show(xlabel); + + gtk_widget_show(xhbox); + + gtk_widget_show(xvbox); + gtk_widget_show(xframe); + gtk_widget_show(xdlg); + gtk_widget_realize(xdlg); + gdk_flush(); + return xdlg; +} + +/********************************************************************** + FUNCTION: set_tooltip + *********************************************************************/ + +void +set_tooltip(GtkTooltips * tooltips, GtkWidget * widget, const char *desc) +{ + if (desc && desc[0]) + gtk_tooltips_set_tip(tooltips, widget, (char *) desc, NULL); +} + +/********************************************************************** + FUNCTION: dialog_change_scale + *********************************************************************/ + +void +dialog_change_scale() +{ + char text[256]; + ready_now = FALSE; + + do_redsinus = (wvals.redmode == SINUS); + do_redcosinus = (wvals.redmode == COSINUS); + do_rednone = (wvals.redmode == NONE); + do_greensinus = (wvals.greenmode == SINUS); + do_greencosinus = (wvals.greenmode == COSINUS); + do_greennone = (wvals.greenmode == NONE); + do_bluesinus = (wvals.bluemode == SINUS); + do_bluecosinus = (wvals.bluemode == COSINUS); + do_bluenone = (wvals.bluemode == NONE); + do_redinvert = (wvals.redinvert != FALSE); + do_greeninvert = (wvals.greeninvert != FALSE); + do_blueinvert = (wvals.blueinvert != FALSE); + do_colormode1 = (wvals.colormode == 0); + do_colormode2 = (wvals.colormode == 1); + do_type0 = (wvals.fractaltype == 0); + do_type1 = (wvals.fractaltype == 1); + do_type2 = (wvals.fractaltype == 2); + do_type3 = (wvals.fractaltype == 3); + do_type4 = (wvals.fractaltype == 4); + do_type5 = (wvals.fractaltype == 5); + do_type6 = (wvals.fractaltype == 6); + do_type7 = (wvals.fractaltype == 7); + do_type8 = (wvals.fractaltype == 8); + + do_english = (wvals.language == 0); + do_german = (wvals.language == 2); + do_french = (wvals.language == 1); + + elements->xmin.data->value = wvals.xmin; + gtk_signal_emit_by_name(GTK_OBJECT(elements->xmin.data), "value_changed"); + elements->xmax.data->value = wvals.xmax; + gtk_signal_emit_by_name(GTK_OBJECT(elements->xmax.data), "value_changed"); + elements->ymin.data->value = wvals.ymin; + gtk_signal_emit_by_name(GTK_OBJECT(elements->ymin.data), "value_changed"); + elements->ymax.data->value = wvals.ymax; + gtk_signal_emit_by_name(GTK_OBJECT(elements->ymax.data), "value_changed"); + elements->iter.data->value = wvals.iter; + gtk_signal_emit_by_name(GTK_OBJECT(elements->iter.data), "value_changed"); + elements->cx.data->value = wvals.cx; + gtk_signal_emit_by_name(GTK_OBJECT(elements->cx.data), "value_changed"); + elements->cy.data->value = wvals.cy; + gtk_signal_emit_by_name(GTK_OBJECT(elements->cy.data), "value_changed"); + + sprintf(text, "%0.15f", wvals.xmin); + gtk_entry_set_text(GTK_ENTRY(elements->xmin.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->xmin.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->xmin.text)); */ + sprintf(text, "%0.15f", wvals.xmax); + gtk_entry_set_text(GTK_ENTRY(elements->xmax.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->xmax.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->xmax.text)); */ + sprintf(text, "%0.15f", wvals.ymin); + gtk_entry_set_text(GTK_ENTRY(elements->ymin.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->ymin.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->ymin.text)); */ + sprintf(text, "%0.15f", wvals.ymax); + gtk_entry_set_text(GTK_ENTRY(elements->ymax.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->ymax.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->ymax.text)); */ + sprintf(text, "%0.15f", wvals.iter); + gtk_entry_set_text(GTK_ENTRY(elements->iter.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->iter.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->iter.text)); */ + sprintf(text, "%0.15f", wvals.cx); + gtk_entry_set_text(GTK_ENTRY(elements->cx.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->cx.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->cx.text)); */ + sprintf(text, "%0.15f", wvals.cy); + gtk_entry_set_text(GTK_ENTRY(elements->cy.text), text); + gtk_entry_set_position (GTK_ENTRY (elements->cy.text), 0); + /* gtk_entry_adjust_scroll (GTK_ENTRY (elements->cy.text)); */ + + elements->red.data->value = wvals.redstretch; + gtk_signal_emit_by_name(GTK_OBJECT(elements->red.data), "value_changed"); + sprintf(text, "%0.0f", wvals.redstretch); + gtk_entry_set_text(GTK_ENTRY(elements->red.text), text); + elements->green.data->value = wvals.greenstretch; + gtk_signal_emit_by_name(GTK_OBJECT(elements->green.data), "value_changed"); + sprintf(text, "%0.0f", wvals.greenstretch); + gtk_entry_set_text(GTK_ENTRY(elements->green.text), text); + elements->blue.data->value = wvals.bluestretch; + gtk_signal_emit_by_name(GTK_OBJECT(elements->blue.data), "value_changed"); + sprintf(text, "%0.0f", wvals.bluestretch); + gtk_entry_set_text(GTK_ENTRY(elements->blue.text), text); + + + if (wvals.fractaltype==0) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_mandelbrot), wvals.fractaltype == 0); + if (wvals.fractaltype==1) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_julia), wvals.fractaltype == 1); + if (wvals.fractaltype==2) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_barnsley1), wvals.fractaltype == 2); + if (wvals.fractaltype==3) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_barnsley2), wvals.fractaltype == 3); + if (wvals.fractaltype==4) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_barnsley3), wvals.fractaltype == 4); + if (wvals.fractaltype==5) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_spider), wvals.fractaltype == 5); + if (wvals.fractaltype==6) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_manowar), wvals.fractaltype == 6); + if (wvals.fractaltype==7) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_lambda), wvals.fractaltype == 7); + if (wvals.fractaltype==8) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->type_sierpinski), wvals.fractaltype == 8); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->redmodesin), wvals.redmode == SINUS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->redmodecos), wvals.redmode == COSINUS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->redmodenone), wvals.redmode == NONE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->greenmodesin), wvals.greenmode == SINUS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->greenmodecos), wvals.greenmode == COSINUS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->greenmodenone), wvals.greenmode == NONE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->bluemodesin), wvals.bluemode == SINUS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->bluemodecos), wvals.bluemode == COSINUS); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->bluemodenone), wvals.bluemode == NONE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->redinvert), wvals.redinvert != FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->greeninvert), wvals.greeninvert != FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->blueinvert), wvals.blueinvert != FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->colormode0), wvals.colormode == 0); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(elements->colormode1), wvals.colormode == 1); + ready_now = TRUE; +} + +/********************************************************************** + FUNCTION: ok_warn_window + *********************************************************************/ + +/* From testgtk */ +static void +ok_warn_window(GtkWidget * widget, + gpointer data) +{ + gtk_widget_destroy(GTK_WIDGET(data)); +} + +/********************************************************************** + FUNCTION: create_warn_dialog + *********************************************************************/ + +void +create_warn_dialog(gchar * msg) +{ + GtkWidget *window = NULL; + GtkWidget *label; + GtkWidget *button; + + window = gtk_dialog_new(); + + gtk_window_set_title(GTK_WINDOW(window), "Warning"); + gtk_container_set_border_width(GTK_CONTAINER(window), 0); + + button = gtk_button_new_with_label("OK"); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) ok_warn_window, + window); + + GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->action_area), button, TRUE, TRUE, 0); + gtk_widget_grab_default(button); + gtk_widget_show(button); + label = gtk_label_new(msg); + gtk_misc_set_padding(GTK_MISC(label), 10, 10); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox), label, TRUE, TRUE, 0); + gtk_widget_show(label); + gtk_widget_show(window); + gtk_main(); + gdk_flush(); + +} + +/********************************************************************** + FUNCTION: save_options + *********************************************************************/ + +void +save_options(FILE * fp) +{ + /* Save options */ + + fprintf(fp, "fractaltype: %i\n", wvals.fractaltype); + fprintf(fp, "xmin: %0.15f\n", wvals.xmin); + fprintf(fp, "xmax: %0.15f\n", wvals.xmax); + fprintf(fp, "ymin: %0.15f\n", wvals.ymin); + fprintf(fp, "ymax: %0.15f\n", wvals.ymax); + fprintf(fp, "iter: %0.15f\n", wvals.iter); + fprintf(fp, "cx: %0.15f\n", wvals.cx); + fprintf(fp, "cy: %0.15f\n", wvals.cy); + fprintf(fp, "redstretch: %0.15f\n", wvals.redstretch); + fprintf(fp, "greenstretch: %0.15f\n", wvals.greenstretch); + fprintf(fp, "bluestretch: %0.15f\n", wvals.bluestretch); + fprintf(fp, "redmode: %i\n", wvals.redmode); + fprintf(fp, "greenmode: %i\n", wvals.greenmode); + fprintf(fp, "bluemode: %i\n", wvals.bluemode); + fprintf(fp, "redinvert: %i\n", wvals.redinvert); + fprintf(fp, "greeninvert: %i\n", wvals.greeninvert); + fprintf(fp, "blueinvert: %i\n", wvals.blueinvert); + fprintf(fp, "colormode: %i\n", wvals.colormode); + fputs("#**********************************************************************\n", fp); + fprintf(fp, "\n"); + fputs("#**********************************************************************\n", fp); +} + +/********************************************************************** + FUNCTION: save_callback + *********************************************************************/ + +void +save_callback() +{ + FILE *fp; + gchar *savename; + + savename = filename; + + fp = fopen(savename, "w+"); + + if (!fp) { + gchar errbuf[256]; + + sprintf(errbuf, msg[lng][MSG_SAVEERROR], savename); + create_warn_dialog(errbuf); + g_warning(errbuf); + return; + } + /* Write header out */ + fputs(FRACTAL_HEADER, fp); + fputs("#**********************************************************************\n", fp); + fputs("# This is a data file for the Fractal Explorer plug-in for the GIMP *\n", fp); + fputs("# Get the plug-in at http://www.multimania.com/cotting *\n", fp); + fputs("#**********************************************************************\n", fp); + + save_options(fp); + + if (ferror(fp)) + create_warn_dialog(msg[lng][MSG_WRITEFAILURE]); + fclose(fp); +} + +/********************************************************************** + FUNCTION: file_selection_ok + *********************************************************************/ + +void +file_selection_ok(GtkWidget * w, + GtkFileSelection * fs, + gpointer data) +{ + gchar *filenamebuf; + struct stat filestat; + gint err; + filenamebuf = gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); + + /* Get the name */ + if (strlen(filenamebuf) == 0) { + create_warn_dialog(msg[lng][MSG_NOFILENAME]); + return; + } + /* Check if directory exists */ + err = stat(filenamebuf, &filestat); + + if (!err && S_ISDIR(filestat.st_mode)) { + /* Can't save to directory */ + create_warn_dialog(msg[lng][MSG_NOSAVETODIR]); + return; + } + filename = g_strdup(filenamebuf); + save_callback(); + gtk_widget_destroy(GTK_WIDGET(fs)); +} + +/********************************************************************** + FUNCTION: destroy_window + *********************************************************************/ + +void +destroy_window(GtkWidget * widget, + GtkWidget ** window) +{ + *window = NULL; +} + +/********************************************************************** + FUNCTION: load_file_selection_ok +**********************************************************************/ + +void +load_file_selection_ok(GtkWidget * w, + GtkFileSelection * fs, + gpointer data) +{ + struct stat filestat; + gint err; + + filename = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs))); + + err = stat(filename, &filestat); + + if (!err && S_ISREG(filestat.st_mode)) { + explorer_load(); + } + gtk_widget_destroy(GTK_WIDGET(fs)); + gtk_widget_show(maindlg); + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); +} + + +/********************************************************************** + FUNCTION: create_load_file_selection + *********************************************************************/ + + +void +create_load_file_selection() +{ + GtkWidget *window = NULL; + + /* Load a single object */ + window = gtk_file_selection_new(msg[lng][MSG_LOADWINTITLE]); + gtk_window_position(GTK_WINDOW(window), GTK_WIN_POS_NONE); + + gtk_signal_connect(GTK_OBJECT(window), "destroy", + (GtkSignalFunc) destroy_window, + &window); + + gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(window)->ok_button), + "clicked", (GtkSignalFunc) load_file_selection_ok, + (gpointer) window); + set_tooltip(tips, GTK_FILE_SELECTION(window)->ok_button, msg[lng][MSG_LOADBUTTONCOMMENT]); + + gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(window)->cancel_button), + "clicked", (GtkSignalFunc) gtk_widget_destroy, + GTK_OBJECT(window)); + set_tooltip(tips, GTK_FILE_SELECTION(window)->cancel_button, msg[lng][MSG_CANCELLOAD]); + if (!GTK_WIDGET_VISIBLE(window)) + gtk_widget_show(window); +} + + +/********************************************************************** + FUNCTION: create_file_selection + *********************************************************************/ + +void +create_file_selection() +{ + GtkWidget *window = NULL; + + if (!window) { + window = gtk_file_selection_new(msg[lng][MSG_SAVEWINTITLE]); + gtk_window_position(GTK_WINDOW(window), GTK_WIN_POS_NONE); + + gtk_signal_connect(GTK_OBJECT(window), "destroy", + (GtkSignalFunc) destroy_window, + &window); + + gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(window)->ok_button), + "clicked", (GtkSignalFunc) file_selection_ok, + (gpointer) window); + set_tooltip(tips, GTK_FILE_SELECTION(window)->ok_button, msg[lng][MSG_SAVEBUTTONCOMMENT]); + + gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(window)->cancel_button), + "clicked", (GtkSignalFunc) gtk_widget_destroy, + GTK_OBJECT(window)); + set_tooltip(tips, GTK_FILE_SELECTION(window)->cancel_button, msg[lng][MSG_CANCELSAVE]); + } + if(tpath) + { + gtk_file_selection_set_filename(GTK_FILE_SELECTION (window),tpath); + } + else + /* Last path is where usually saved to */ + if(fractalexplorer_path_list) + { + gtk_file_selection_set_filename(GTK_FILE_SELECTION (window), + g_list_nth(fractalexplorer_path_list, + g_list_length(fractalexplorer_path_list)-1)->data); + } + else + gtk_file_selection_set_filename(GTK_FILE_SELECTION (window),"/tmp"); + + if (!GTK_WIDGET_VISIBLE(window)) + gtk_widget_show(window); + +} + +/********************************************************************** + FUNCTION: get_line + *********************************************************************/ + +char * +get_line(gchar * buf, gint s, FILE * from, gint init) +{ + gint slen; + char *ret; + + if (init) + line_no = 1; + else + line_no++; + + do { + ret = fgets(buf, s, from); + } + while (!ferror(from) && buf[0] == '#'); + + slen = strlen(buf); + + /* The last newline is a pain */ + if (slen > 0) + buf[slen - 1] = '\0'; + + if (ferror(from)) { + g_warning("Error reading file"); + return (0); + } + return (ret); +} + +/********************************************************************** + FUNCTION: load_options + *********************************************************************/ + +gint +load_options(fractalexplorerOBJ * xxx, FILE * fp) +{ + gchar load_buf[MAX_LOAD_LINE]; + gchar str_buf[MAX_LOAD_LINE]; + gchar opt_buf[MAX_LOAD_LINE]; + + xxx->opts.fractaltype=0; + xxx->opts.xmin=-2.0; + xxx->opts.xmax=2.0; + xxx->opts.ymin=-1.5; + xxx->opts.ymax=1.5; + xxx->opts.iter=50.0; + xxx->opts.cx=-0.75; + xxx->opts.cy=-0.2; + xxx->opts.colormode=0; + xxx->opts.redstretch=128.0; + xxx->opts.greenstretch=128.0; + xxx->opts.bluestretch=128.0; + xxx->opts.redmode=1; + xxx->opts.greenmode=1; + xxx->opts.bluemode=1; + xxx->opts.redinvert=0; + xxx->opts.greeninvert=0; + xxx->opts.blueinvert=0; + xxx->opts.alwayspreview=1; + + get_line(load_buf, MAX_LOAD_LINE, fp, 0); + + while (strcmp(load_buf, "")) { + /* Get option name */ + + sscanf(load_buf, "%s %s", str_buf, opt_buf); + + if (!strcmp(str_buf, "fractaltype:")) { + /* Value is decimal */ + int sp = 0; + + sp = atoi(opt_buf); + if (sp < 0) + return (-1); + xxx->opts.fractaltype = sp; + } else if (!strcmp(str_buf, "xmin:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.xmin = sp; + } else if (!strcmp(str_buf, "xmax:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.xmax = sp; + } else if (!strcmp(str_buf, "ymin:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.ymin = sp; + } else if (!strcmp(str_buf, "ymax:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.ymax = sp; + } else if (!strcmp(str_buf, "redstretch:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.redstretch = sp; + } else if (!strcmp(str_buf, "greenstretch:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.greenstretch = sp; + } else if (!strcmp(str_buf, "bluestretch:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.bluestretch = sp; + } else if (!strcmp(str_buf, "iter:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.iter = sp; + } else if (!strcmp(str_buf, "cx:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.cx = sp; + } else if (!strcmp(str_buf, "cy:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + xxx->opts.cy = sp; + } else if (!strcmp(str_buf, "redmode:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.redmode = sp; + } else if (!strcmp(str_buf, "greenmode:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.greenmode = sp; + } else if (!strcmp(str_buf, "bluemode:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.bluemode = sp; + } else if (!strcmp(str_buf, "redinvert:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.redinvert = sp; + } else if (!strcmp(str_buf, "greeninvert:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.greeninvert = sp; + } else if (!strcmp(str_buf, "blueinvert:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.blueinvert = sp; + } else if (!strcmp(str_buf, "colormode:")) { + int sp = 0; + + sp = atoi(opt_buf); + xxx->opts.colormode = sp; + } + get_line(load_buf, MAX_LOAD_LINE, fp, 0); + } + return (0); +} + + +/********************************************************************** + FUNCTION: gradient_load_options + *********************************************************************/ + +gint +gradient_load_options(gradientOBJ * xxx, FILE * fp) +{ + gchar load_buf[MAX_LOAD_LINE]; + gchar str_buf[MAX_LOAD_LINE]; + gchar opt_buf[MAX_LOAD_LINE]; + + get_line(load_buf, MAX_LOAD_LINE, fp, 0); + + while (strcmp(load_buf, "")) { + /* Get option name */ + + sscanf(load_buf, "%s %s", str_buf, opt_buf); + + if (!strcmp(str_buf, "redstretch:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + wvals.redstretch = sp; + } else if (!strcmp(str_buf, "greenstretch:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + wvals.greenstretch = sp; + } else if (!strcmp(str_buf, "bluestretch:")) { + /* Value is double */ + double sp = 0; + + sp = atof(opt_buf); + wvals.bluestretch = sp; + } else if (!strcmp(str_buf, "redmode:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.redmode = sp; + } else if (!strcmp(str_buf, "greenmode:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.greenmode = sp; + } else if (!strcmp(str_buf, "bluemode:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.bluemode = sp; + } else if (!strcmp(str_buf, "redinvert:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.redinvert = sp; + } else if (!strcmp(str_buf, "greeninvert:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.greeninvert = sp; + } else if (!strcmp(str_buf, "blueinvert:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.blueinvert = sp; + } else if (!strcmp(str_buf, "colormode:")) { + int sp = 0; + + sp = atoi(opt_buf); + wvals.colormode = sp; + } + get_line(load_buf, MAX_LOAD_LINE, fp, 0); + } + return (0); +} + +/********************************************************************** + FUNCTION: explorer_load + *********************************************************************/ + +void +explorer_load() +{ + FILE *fp; + gchar load_buf[MAX_LOAD_LINE]; + + g_assert(filename != NULL); + fp = fopen(filename, "r"); + if (!fp) { + g_warning(msg[lng][MSG_OPENERROR], filename); + return; + } + get_line(load_buf, MAX_LOAD_LINE, fp, 1); + + if (strncmp(FRACTAL_HEADER, load_buf, strlen(load_buf))) { + gchar err[256]; + + sprintf(err, msg[lng][MSG_WRONGFILETYPE], filename); + create_warn_dialog(err); + return; + } + if (load_options(current_obj,fp)) { + /* waste some mem */ + gchar err[256]; + + sprintf(err, + msg[lng][MSG_CORRUPTFILE], + filename, + line_no); + create_warn_dialog(err); + return; + } + wvals=current_obj->opts; + fclose(fp); +} diff --git a/plug-ins/FractalExplorer/Events.h b/plug-ins/FractalExplorer/Events.h new file mode 100644 index 0000000000..d40011c2ee --- /dev/null +++ b/plug-ins/FractalExplorer/Events.h @@ -0,0 +1,304 @@ + +/********************************************************************** + FUNCTION: preview_button_press_event + *********************************************************************/ + +gint +preview_button_press_event(GtkWidget * widget, GdkEventButton * event) +{ + double left, + right, + bottom, + top, + dx, + dy; + int px, + py, + x, + y; + unsigned short r, + g, + b; + guchar *p_ul, + *i, + *p; + + if (event->button == 1) { + x_press = event->x; + y_press = event->y; + left = sel_x1; + right = sel_x2 - 1; + bottom = sel_y2 - 1; + top = sel_y1; + dx = (right - left) / (preview_width - 1); + dy = (bottom - top) / (preview_height - 1); + xbild = preview_width; + ybild = preview_height; + xdiff = (xmax - xmin) / xbild; + ydiff = (ymax - ymin) / ybild; + + py = y_press; + px = 0; + p_ul = wint.wimage + 3 * (preview_width * py + 0); + + for (x = 0; x < preview_width; x++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3; + px += 1; + } + py = 0; + p_ul = wint.wimage + 3 * (preview_width * 0 + (int) x_press); + px = x_press; + for (y = 0; y < preview_height; y++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3 * (preview_width); + py += 1; + } /* for */ + + p = wint.wimage; + + for (y = 0; y < preview_height; y++) { + gtk_preview_draw_row(GTK_PREVIEW(wint.preview), p, 0, y, preview_width); + p += preview_width * 3; + } /* for */ + gtk_widget_draw(wint.preview, NULL); + gdk_flush(); + + } + return (TRUE); +} + +/********************************************************************** + FUNCTION: preview_motion_notify_event + *********************************************************************/ + +gint +preview_motion_notify_event(GtkWidget * widget, GdkEventButton * event) +{ + int px, + py, + x, + y; + unsigned short r, + g, + b; + guchar *p_ul, + *i, + *p; + + ypos = oldypos; + xpos = oldxpos; + if (oldypos != -1) { + py = ypos; + px = 0; + p_ul = wint.wimage + 3 * (preview_width * py + 0); + + for (x = 0; x < preview_width; x++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3; + px += 1; + } + py = 0; + p_ul = wint.wimage + 3 * (preview_width * 0 + (int) xpos); + px = xpos; + for (y = 0; y < preview_height; y++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3 * (preview_width); + py += 1; + } /* for */ + } + oldxpos = xpos = event->x; + oldypos = ypos = event->y; + + if ((xpos >= 0.0) && (ypos >= 0.0) + && (xpos < preview_width) && (ypos < preview_height)) { + + py = ypos; + px = 0; + p_ul = wint.wimage + 3 * (preview_width * py + 0); + + for (x = 0; x < preview_width; x++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3; + px += 1; + } + py = 0; + p_ul = wint.wimage + 3 * (preview_width * 0 + (int) xpos); + px = xpos; + for (y = 0; y < preview_height; y++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3 * (preview_width); + py += 1; + } /* for */ + } else { + oldypos = -1; + oldxpos = -1; + } + + p = wint.wimage; + + for (y = 0; y < preview_height; y++) { + gtk_preview_draw_row(GTK_PREVIEW(wint.preview), p, 0, y, preview_width); + p += preview_width * 3; + } /* for */ + gtk_widget_draw(wint.preview, NULL); + gdk_flush(); + + return (TRUE); +} + +/********************************************************************** + FUNCTION: preview_leave_notify_event + *********************************************************************/ + +gint +preview_leave_notify_event(GtkWidget * widget, GdkEventButton * event) +{ + int px, + py, + x, + y; + unsigned short r, + g, + b; + guchar *p_ul, + *i, + *p; + + ypos = oldypos; + xpos = oldxpos; + if (oldypos != -1) { + py = ypos; + px = 0; + p_ul = wint.wimage + 3 * (preview_width * py + 0); + + for (x = 0; x < preview_width; x++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3; + px += 1; + } + py = 0; + p_ul = wint.wimage + 3 * (preview_width * 0 + (int) xpos); + px = xpos; + for (y = 0; y < preview_height; y++) { + i = wint.wimage + 3 * (preview_width * py + px); + r = (*i++) ^ 254; + g = (*i++) ^ 254; + b = (*i) ^ 254; + p_ul[0] = r; + p_ul[1] = g; + p_ul[2] = b; + p_ul += 3 * (preview_width); + py += 1; + } /* for */ + } + oldxpos = -1; + oldypos = -1; + + p = wint.wimage; + + for (y = 0; y < preview_height; y++) { + gtk_preview_draw_row(GTK_PREVIEW(wint.preview), p, 0, y, preview_width); + p += preview_width * 3; + } /* for */ + gtk_widget_draw(wint.preview, NULL); + gdk_flush(); + MyCursor = gdk_cursor_new(GDK_TOP_LEFT_ARROW); + gdk_window_set_cursor(maindlg->window, MyCursor); + + return (TRUE); +} + +/********************************************************************** + FUNCTION: preview_enter_notify_event + *********************************************************************/ + +gint +preview_enter_notify_event(GtkWidget * widget, GdkEventButton * event) +{ + MyCursor = gdk_cursor_new(GDK_TCROSS); + gdk_window_set_cursor(maindlg->window, MyCursor); + return (TRUE); +} + +/********************************************************************** + FUNCTION: preview_button_release_event + *********************************************************************/ + +gint +preview_button_release_event(GtkWidget * widget, GdkEventButton * event) +{ + double l_xmin, + l_xmax, + l_ymin, + l_ymax; + if (event->button == 1) { + x_release = event->x; + y_release = event->y; + + if ((x_press >= 0.0) && (y_press >= 0.0) + && (x_release >= 0.0) && (y_release >= 0.0) + && (x_press < preview_width) && (y_press < preview_height) + && (x_release < preview_width) && (y_release < preview_height)) { + l_xmin = wvals.xmin + (wvals.xmax - wvals.xmin) * (x_press / preview_width); + l_xmax = wvals.xmin + (wvals.xmax - wvals.xmin) * (x_release / preview_width); + l_ymin = wvals.ymin + (wvals.ymax - wvals.ymin) * (y_press / preview_height); + l_ymax = wvals.ymin + (wvals.ymax - wvals.ymin) * (y_release / preview_height); + zooms[zoomindex] = wvals; + zoomindex++; + if (zoomindex > 99) + zoomindex = 99; + zoommax = zoomindex; + wvals.xmin = l_xmin; + wvals.xmax = l_xmax; + wvals.ymin = l_ymin; + wvals.ymax = l_ymax; + dialog_change_scale(); + dialog_update_preview(); + oldypos = oldxpos = -1; + } + } + return (TRUE); +} diff --git a/plug-ins/FractalExplorer/FractalExplorer.c b/plug-ins/FractalExplorer/FractalExplorer.c new file mode 100644 index 0000000000..b0a8e8f551 --- /dev/null +++ b/plug-ins/FractalExplorer/FractalExplorer.c @@ -0,0 +1,2222 @@ +/********************************************************************** + Fractal Explorer Plug-in (Version 2.00 Beta 2) + Daniel Cotting (cotting@multimania.com) + ********************************************************************** + ********************************************************************** + Official homepages: http://www.multimania.com/cotting + http://cotting.citeweb.net + *********************************************************************/ + +/********************************************************************** + The GIMP -- an image manipulation program + Copyright (C) 1995 Spencer Kimball and Peter Mattis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *********************************************************************/ + +/********************************************************************** + Some code has been 'stolen' from: + - Peter Kirchgessner (Pkirchg@aol.com) + - Scott Draves (spot@cs.cmu.edu) + - Andy Thomas (alt@picnic.demon.co.uk) + . + . + . + ********************************************************************** + "If you steal from one author it's plagiarism; if you steal from + many it's research." --Wilson Mizner + *********************************************************************/ + +/********************************************************************** + Include necessary files + *********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "gtk/gtk.h" +#include "libgimp/gimp.h" + +#include "logo.h" +#include "pix_data.h" + +#include "Languages.h" +#include "FractalExplorer.h" +#include "Events.h" +#include "Callbacks.h" +#include "Dialogs.h" + +/********************************************************************** + MAIN() + *********************************************************************/ + +MAIN() + +/********************************************************************** + FUNCTION: query + *********************************************************************/ + +static void +query() +{ + static GParamDef args[] = + { + {PARAM_INT32, "run_mode", "Interactive, non-interactive"}, + {PARAM_IMAGE, "image", "Input image"}, + {PARAM_DRAWABLE, "drawable", "Input drawable"}, + {PARAM_INT8, "fractaltype", "0: Mandelbrot; 1: Julia; 2: Barnsley 1; 3: Barnsley 2; 4: Barnsley 3; 5: Spider; 6: ManOWar; 7: Lambda; 8: Sierpinski"}, + {PARAM_FLOAT, "xmin", "xmin fractal image delimiter"}, + {PARAM_FLOAT, "xmax", "xmax fractal image delimiter"}, + {PARAM_FLOAT, "ymin", "ymin fractal image delimiter"}, + {PARAM_FLOAT, "ymax", "ymax fractal image delimiter"}, + {PARAM_FLOAT, "iter", "Iteration value"}, + {PARAM_FLOAT, "cx", "cx value ( only Julia)"}, + {PARAM_FLOAT, "cy", "cy value ( only Julia)"}, + {PARAM_INT8, "colormode", "0: Apply colormap as specified by the parameters below; 1: Apply active gradient to final image"}, + {PARAM_FLOAT, "redstretch", "Red stretching factor"}, + {PARAM_FLOAT, "greenstretch", "Green stretching factor"}, + {PARAM_FLOAT, "bluestretch", "Blue stretching factor"}, + {PARAM_INT8, "redmode", "Red application mode (0:SIN;1:COS;2:NONE)"}, + {PARAM_INT8, "greenmode", "Green application mode (0:SIN;1:COS;2:NONE)"}, + {PARAM_INT8, "bluemode", "Blue application mode (0:SIN;1:COS;2:NONE)"}, + {PARAM_INT8, "redinvert", "Red inversion mode (1: enabled; 0: disabled)"}, + {PARAM_INT8, "greeninvert", "Green inversion mode (1: enabled; 0: disabled)"}, + {PARAM_INT8, "blueinvert", "Green inversion mode (1: enabled; 0: disabled)"}, + }; + static GParamDef *return_vals = NULL; + static int nargs = sizeof(args) / sizeof(args[0]); + static int nreturn_vals = 0; + + gimp_install_procedure("plug_in_fractalexplorer", + "Chaos Fractal Explorer Plug-In", + "No help yet.", + "Daniel Cotting (cotting@multimania.com, www.multimania.com/cotting)", + "Daniel Cotting (cotting@multimania.com, www.multimania.com/cotting)", + "December, 1998", + "/Filters/Render/Fractal Explorer", + "RGB*", + PROC_PLUG_IN, + nargs, nreturn_vals, + args, return_vals); +} + +/********************************************************************** + FUNCTION: run + *********************************************************************/ + +static void +run(char *name, + int nparams, + GParam * param, + int *nreturn_vals, + GParam ** return_vals) +{ + static GParam values[1]; + gint32 image_ID; + GRunModeType run_mode; + double xhsiz, + yhsiz; + int pwidth, + pheight; + GStatusType status = STATUS_SUCCESS; + FILE * fp; + gchar * filname=NULL; + gchar load_buf[MAX_LOAD_LINE]; + + run_mode = param[0].data.d_int32; + + values[0].type = PARAM_STATUS; + values[0].data.d_status = status; + + *nreturn_vals = 1; + *return_vals = values; + + /* Get the specified drawable */ + drawable = gimp_drawable_get(param[2].data.d_drawable); + image_ID = param[1].data.d_image; + tile_width = gimp_tile_width(); + tile_height = gimp_tile_height(); + + img_width = gimp_drawable_width(drawable->id); + img_height = gimp_drawable_height(drawable->id); + img_bpp = gimp_drawable_bpp(drawable->id); + + gimp_drawable_mask_bounds(drawable->id, &sel_x1, &sel_y1, &sel_x2, &sel_y2); + + sel_width = sel_x2 - sel_x1; + sel_height = sel_y2 - sel_y1; + + cen_x = (double) (sel_x2 - 1 + sel_x1) / 2.0; + cen_y = (double) (sel_y2 - 1 + sel_y1) / 2.0; + + xhsiz = (double) (sel_width - 1) / 2.0; + yhsiz = (double) (sel_height - 1) / 2.0; + + /* Calculate preview size */ + if (sel_width > sel_height) { + pwidth = MIN(sel_width, PREVIEW_SIZE); + pheight = sel_height * pwidth / sel_width; + } else { + pheight = MIN(sel_height, PREVIEW_SIZE); + pwidth = sel_width * pheight / sel_height; + } /* else */ + + preview_width = MAX(pwidth, 2); /* Min size is 2 */ + preview_height = MAX(pheight, 2); + + /* See how we will run */ + switch (run_mode) { + case RUN_INTERACTIVE: + /* Possibly retrieve data */ + + gimp_get_data("plug_in_fractalexplorer", &wvals); + + lng=0; + + filname = g_strconcat (gimp_directory (), + G_DIR_SEPARATOR_S, + "fractalexplorerrc", + NULL); + fp = fopen (filname, "r"); + if (!fp) + { + fp = fopen (filname, "w"); + if (fp) fputs("FX-LANG:En\n",fp); + } + else + { + fgets(load_buf, MAX_LOAD_LINE, fp); + if (strlen(load_buf) > 0) load_buf[strlen(load_buf) - 1] = '\0'; + if(strncmp("FX-LANG:En",load_buf,strlen(load_buf))==0) + { lng=0; } + if(strncmp("FX-LANG:Fr",load_buf,strlen(load_buf))==0) + { lng=1; } + if(strncmp("FX-LANG:De",load_buf,strlen(load_buf))==0) + { lng=2; } + } + fclose(fp); + + wvals.language=lng; + do_english = (wvals.language == 0); + do_french = (wvals.language == 1); + do_german = (wvals.language == 2); + + /* Get information from the dialog */ + + if (!explorer_dialog()) + return; + + break; + + case RUN_NONINTERACTIVE: + /* Make sure all the arguments are present */ + + if (nparams != 21) + status = STATUS_CALLING_ERROR; + + if (status == STATUS_SUCCESS) { + wvals.fractaltype = param[3].data.d_int8; + wvals.xmin = param[4].data.d_float; + wvals.xmax = param[5].data.d_float; + wvals.ymin = param[6].data.d_float; + wvals.ymax = param[7].data.d_float; + wvals.iter = param[8].data.d_float; + wvals.cx = param[9].data.d_float; + wvals.cy = param[10].data.d_float; + wvals.colormode = param[11].data.d_int8; + wvals.redstretch = param[12].data.d_float; + wvals.greenstretch = param[13].data.d_float; + wvals.bluestretch = param[14].data.d_float; + wvals.redmode = param[15].data.d_int8; + wvals.greenmode = param[16].data.d_int8; + wvals.bluemode = param[17].data.d_int8; + wvals.redinvert = param[18].data.d_int8; + wvals.greeninvert = param[19].data.d_int8; + wvals.blueinvert = param[20].data.d_int8; + } + make_color_map(); + break; + + case RUN_WITH_LAST_VALS: + /* Possibly retrieve data */ + + gimp_get_data("plug_in_fractalexplorer", &wvals); + make_color_map(); + break; + + default: + break; + } /* switch */ + + xmin = wvals.xmin; + xmax = wvals.xmax; + ymin = wvals.ymin; + ymax = wvals.ymax; + cx = wvals.cx; + cy = wvals.cy; + + if (status == STATUS_SUCCESS) { + /* Make sure that the drawable is indexed or RGB color */ + if (gimp_drawable_color(drawable->id)) { + gimp_progress_init("Rendering fractal..."); + + /* Set the tile cache size */ + gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_width() + 1)); + /* Run! */ + + explorer(drawable); + if (run_mode != RUN_NONINTERACTIVE) + gimp_displays_flush(); + + /* Store data */ + + if (run_mode == RUN_INTERACTIVE) + gimp_set_data("plug_in_fractalexplorer", &wvals, sizeof(explorer_vals_t)); + } else { + status = STATUS_EXECUTION_ERROR; + } + } + values[0].data.d_status = status; + + gimp_drawable_detach(drawable); +} + +/********************************************************************** + FUNCTION: explorer + *********************************************************************/ + +void +explorer(GDrawable * drawable) +{ + GPixelRgn srcPR, + destPR; + gint width, + height, + bytes, + row, + x1, + y1, + x2, + y2; + guchar *src_row, + *dest_row; + + /* Get the input area. This is the bounding box of the selection in + * the image (or the entire image if there is no selection). Only + * operating on the input area is simply an optimization. It doesn't + * need to be done for correct operation. (It simply makes it go + * faster, since fewer pixels need to be operated on). + */ + gimp_drawable_mask_bounds(drawable->id, &x1, &y1, &x2, &y2); + + /* Get the size of the input image. (This will/must be the same + * as the size of the output image. + */ + width = drawable->width; + height = drawable->height; + bytes = drawable->bpp; + + /* allocate row buffers */ + src_row = (guchar *) malloc((x2 - x1) * bytes); + dest_row = (guchar *) malloc((x2 - x1) * bytes); + + /* initialize the pixel regions */ + gimp_pixel_rgn_init(&srcPR, drawable, 0, 0, width, height, FALSE, FALSE); + gimp_pixel_rgn_init(&destPR, drawable, 0, 0, width, height, TRUE, TRUE); + + xbild = width; + ybild = height; + xdiff = (xmax - xmin) / xbild; + ydiff = (ymax - ymin) / ybild; + + for (row = y1; row < y2; row++) { + gimp_pixel_rgn_get_row(&srcPR, src_row, x1, row, (x2 - x1)); + + explorer_render_row(src_row, + dest_row, + row, + (x2 - x1), + bytes); + + /* store the dest */ + gimp_pixel_rgn_set_row(&destPR, dest_row, x1, row, (x2 - x1)); + + if ((row % 10) == 0) + gimp_progress_update((double) row / (double) (y2 - y1)); + } + + /* update the processed region */ + gimp_drawable_flush(drawable); + gimp_drawable_merge_shadow(drawable->id, TRUE); + gimp_drawable_update(drawable->id, x1, y1, (x2 - x1), (y2 - y1)); + + free(src_row); + free(dest_row); +} + +/********************************************************************** + FUNCTION: explorer_render_row + *********************************************************************/ + +void +explorer_render_row(const guchar * src_row, + guchar * dest_row, + gint row, + gint row_width, + gint bytes) +{ + gint col, + bytenum; + double a, + b, + x, + y, + oldx, + oldy, + tempsqrx, + tempsqry, + tmpx=0, + tmpy=0, + foldxinitx, + foldxinity, + foldyinitx, + foldyinity, + xx=0, + cx, + cy; + int zaehler, + color, + iteration; + cx = wvals.cx; + cy = wvals.cy; + iteration = wvals.iter; + for (col = 0; col < row_width; col++) { + a = xmin + (double) col *xdiff; + b = ymin + (double) row *ydiff; + if (wvals.fractaltype!=0) { + tmpx = x = a; + tmpy = y = b; + } else { + x = 0; + y = 0; + } + for (zaehler = 0; (zaehler < iteration) && ((x * x + y * y) < 4); zaehler++) { + oldx=x; oldy=y; + if (wvals.fractaltype==1) { + /* Julia */ + xx = x * x - y * y + cx; + y = 2.0 * x * y + cy; + } else if (wvals.fractaltype==0) { + /*Mandelbrot*/ + xx = x * x - y * y + a; + y = 2.0 * x * y + b; + } else if (wvals.fractaltype==2) { +/* Some code taken from X-Fractint */ +/* Barnsley M1 */ + foldxinitx = oldx * cx; + foldyinity = oldy * cy; + foldxinity = oldx * cy; + foldyinitx = oldy * cx; + /* orbit calculation */ + if(oldx >= 0) + { + xx = (foldxinitx - cx - foldyinity); + y = (foldyinitx - cy + foldxinity); + } + else + { + xx = (foldxinitx + cx - foldyinity); + y = (foldyinitx + cy + foldxinity); + } + } else if (wvals.fractaltype==3) { +/* Barnsley Unnamed */ + + foldxinitx = oldx * cx; + foldyinity = oldy * cy; + foldxinity = oldx * cy; + foldyinitx = oldy * cx; + /* orbit calculation */ + if(foldxinity + foldyinitx >= 0) + { + xx = foldxinitx - cx - foldyinity; + y = foldyinitx - cy + foldxinity; + } + else + { + xx = foldxinitx + cx - foldyinity; + y = foldyinitx + cy + foldxinity; + } + } else if (wvals.fractaltype==4) { + /*Barnsley 1*/ + foldxinitx = oldx * oldx; + foldyinity = oldy * oldy; + foldxinity = oldx * oldy; + /* orbit calculation */ + if(oldx > 0) + { + xx = foldxinitx - foldyinity - 1.0; + y = foldxinity * 2; + } + else + { + xx = foldxinitx - foldyinity -1.0 + cx * oldx; + y = foldxinity * 2; + y += cy * oldx; + } + } else if (wvals.fractaltype==5) { + /* Spider(XAXIS) { c=z=pixel: z=z*z+c; c=c/2+z, |z|<=4 } */ + xx = x*x - y*y + tmpx + cx; + y = 2 * oldx * oldy + tmpy +cy; + tmpx = tmpx/2 + xx; + tmpy = tmpy/2 + y; + } else if (wvals.fractaltype==6) { +/* ManOWarfpFractal() */ + xx = x*x - y*y + tmpx + cx; + y = 2.0 * x * y + tmpy + cy; + tmpx = oldx; + tmpy = oldy; + } else if (wvals.fractaltype==7) { +/* Lambda */ + tempsqrx=x*x; + tempsqry=y*y; + tempsqrx = oldx - tempsqrx + tempsqry; + tempsqry = -(oldy * oldx); + tempsqry += tempsqry + oldy; + xx = cx * tempsqrx - cy * tempsqry; + y = cx * tempsqry + cy * tempsqrx; + } else if (wvals.fractaltype==8) { +/* Sierpinski */ + xx = oldx + oldx; + y = oldy + oldy; + if(oldy > .5) + y = y - 1; + else if (oldx > .5) + xx = xx - 1; + } + x = xx; + } + color = (int) (zaehler * 255.0 / iteration); + dest_row[col * bytes] = colormap[color][0]; + dest_row[col * bytes + 1] = colormap[color][1]; + dest_row[col * bytes + 2] = colormap[color][2]; + + if (bytes > 3) + for (bytenum = 3; bytenum < bytes; bytenum++) { + dest_row[col * bytes + bytenum] = src_row[col * bytes + bytenum]; + } + } +} + + +/* + +static gint +rename_button_press(GtkWidget *widget, + GdkEventButton *event, + gpointer data) +{ + GtkWidget *list = (GtkWidget *)data; + GList * sellist; + fractalexplorerOBJ * sel_obj; + + sellist = GTK_LIST(list)->selection; + + sel_obj = (fractalexplorerOBJ *)gtk_object_get_user_data(GTK_OBJECT((GtkWidget *)(sellist->data))); + + fractalexplorer_dialog_edit_list(widget,(gpointer) sel_obj,FALSE); + return(FALSE); +} +*/ + +static gint +delete_button_press_cancel(GtkWidget *widget, + gpointer data) +{ + gtk_widget_destroy(delete_dialog); + gtk_widget_set_sensitive(delete_frame_to_freeze,TRUE); + delete_dialog = NULL; + + return(FALSE); +} + +static gint +fractalexplorer_delete_fractalexplorer_callback(GtkWidget *widget, + GdkEventButton *event, + gpointer data) +{ + GtkWidget *vbox; + GtkWidget *label; + GtkWidget *button; + char *str; + GtkWidget *list = (GtkWidget *)data; + GList * sellist; + fractalexplorerOBJ * sel_obj; + + + sellist = GTK_LIST(list)->selection; + + sel_obj = (fractalexplorerOBJ *)gtk_object_get_user_data(GTK_OBJECT((GtkWidget *)(sellist->data))); + if(delete_dialog) + return(FALSE); + + delete_dialog = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(delete_dialog), msg[lng][MSG_DELFRAC]); + gtk_window_position(GTK_WINDOW(delete_dialog), GTK_WIN_POS_MOUSE); + gtk_container_set_border_width(GTK_CONTAINER(delete_dialog), 0); + + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(delete_dialog)->vbox), vbox, + FALSE, FALSE, 0); + gtk_widget_show(vbox); + + /* Question */ + + label = gtk_label_new(msg[lng][MSG_DELSURE]); + gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); + gtk_widget_show(label); + + str = g_malloc((strlen(sel_obj->draw_name) + 32 * sizeof(char))); + + sprintf(str, msg[lng][MSG_DELSURE2], sel_obj->draw_name); + + label = gtk_label_new(str); + gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); + gtk_widget_show(label); + + g_free(str); + + /* Buttons */ + button = gtk_button_new_with_label (msg[lng][MSG_DEL]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc) delete_button_press_ok, + data); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (delete_dialog)->action_area), button, TRUE, TRUE, 0); + gtk_widget_grab_default (button); + gtk_object_set_user_data(GTK_OBJECT(button),widget); + gtk_widget_show (button); + + button = gtk_button_new_with_label (msg[lng][MSG_CANCEL]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc) delete_button_press_cancel, + data); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (delete_dialog)->action_area), button, TRUE, TRUE, 0); + gtk_widget_grab_default (button); + gtk_object_set_user_data(GTK_OBJECT(button),widget); + gtk_widget_show (button); + + /* Show! */ + + gtk_widget_set_sensitive(GTK_WIDGET(delete_frame_to_freeze), FALSE); + gtk_widget_show(delete_dialog); + + return(FALSE); +} + + +void +fractalexplorer_save(void) +{ + /* Save the current object */ + if(!current_obj->filename) + { + create_file_selection(current_obj,NULL); + return; + } + save_callback(); +} + + +static gint +gradient_list_button_press(GtkWidget *widget, + GdkEventButton *event, + gpointer data) +{ + + gradientOBJ * sel_obj; + FILE * fp; + gchar * filename; + gchar load_buf[MAX_LOAD_LINE]; + + switch (event->type) + { + case GDK_BUTTON_PRESS: + if(event->button == 3) + { + } + break; + case GDK_2BUTTON_PRESS: + sel_obj = (gradientOBJ *)data; + if(sel_obj) { + if (sel_obj->obj_status && gradient_GRADIENTEDITOR) + { + wvals.colormode=1; + gimp_gradients_set_active(sel_obj->name); + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); + } + else + { + filename=sel_obj->filename; + g_assert (filename != NULL); + fp = fopen (filename, "r"); + if (!fp) + { + g_warning (msg[lng][MSG_OPENERROR], filename); + return 0; + } + get_line(load_buf,MAX_LOAD_LINE,fp,1); + if(strncmp(fractalexplorer_HEADER,load_buf,strlen(load_buf))) + { + gchar err[256]; + sprintf(err,msg[lng][MSG_WRONGFILETYPE],sel_obj->filename); + create_warn_dialog(err); + return(0); + } + + if(gradient_load_options(sel_obj,fp)) + { + gchar err[256]; + sprintf(err,msg[lng][MSG_CORRUPTFILE], + filename, + line_no); + create_warn_dialog(err); + return(0); + } + fclose(fp); + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); + } + } + else + g_warning(msg[lng][MSG_NULLLIST]); + break; + default: + printf(msg[lng][MSG_UNKNOWN_EVENT]); + break; + } + + return(FALSE); +} + + +static void +fractalexplorer_list_ok_callback (GtkWidget *w, + gpointer client_data) +{ + fractalexplorerListOptions *options; + GtkWidget *list; + gint pos; + + options = (fractalexplorerListOptions *) client_data; + list = options->list_entry; + + /* Set the new layer name */ + if (options->obj->draw_name) + { + g_free(options->obj->draw_name); + } + options->obj->draw_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (options->name_entry))); + + /* Need to reorder the list */ + /* gtk_label_set (GTK_LABEL (options->layer_widget->label), layer->name);*/ + + pos = gtk_list_child_position(GTK_LIST(fractalexplorer_gtk_list),list); + + gtk_list_clear_items(GTK_LIST (fractalexplorer_gtk_list),pos,pos+1); + + /* remove/Add again */ + fractalexplorer_list = g_list_remove(fractalexplorer_list,options->obj); + fractalexplorer_list_add(options->obj); + + options->obj->obj_status |= fractalexplorer_MODIFIED; + + gtk_widget_destroy (options->query_box); + g_free (options); + +} + +static void +fractalexplorer_list_cancel_callback (GtkWidget *w, + gpointer client_data) +{ + fractalexplorerListOptions *options; + + options = (fractalexplorerListOptions *) client_data; + if(options->created) + { + /* We are creating an entry so if cancelled must del the list item as well */ + delete_button_press_ok(w,fractalexplorer_gtk_list); + } + + gtk_widget_destroy (options->query_box); + g_free (options); +} + + +static void +fractalexplorer_dialog_edit_list (GtkWidget *lwidget,fractalexplorerOBJ *obj,gint created) +{ + fractalexplorerListOptions *options; + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *button; + GtkWidget *label; + + /* the new options structure */ + options = (fractalexplorerListOptions *) g_malloc (sizeof (fractalexplorerListOptions)); + options->list_entry = lwidget; + options->obj = obj; + options->created = created; + + /* the dialog */ + options->query_box = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (options->query_box),msg[lng][MSG_EDIT_FRACNAME]); + gtk_window_position (GTK_WINDOW (options->query_box), GTK_WIN_POS_MOUSE); + + /* the main vbox */ + vbox = gtk_vbox_new (FALSE, 1); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 2); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (options->query_box)->vbox), vbox, TRUE, TRUE, 0); + + /* the name entry hbox, label and entry */ + hbox = gtk_hbox_new (FALSE, 1); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + label = gtk_label_new (msg[lng][MSG_FRACNAME]); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + options->name_entry = gtk_entry_new (); + gtk_box_pack_start (GTK_BOX (hbox), options->name_entry, TRUE, TRUE, 0); + gtk_entry_set_text (GTK_ENTRY (options->name_entry),obj->draw_name); + + gtk_widget_show (options->name_entry); + gtk_widget_show (hbox); + + button = gtk_button_new_with_label (msg[lng][MSG_OK]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc)fractalexplorer_list_ok_callback, + options); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (options->query_box)->action_area), button, TRUE, TRUE, 0); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (msg[lng][MSG_CANCEL]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc)fractalexplorer_list_cancel_callback, + options); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (options->query_box)->action_area), button, TRUE, TRUE, 0); + gtk_widget_show (button); + + gtk_widget_show (vbox); + gtk_widget_show (options->query_box); +} + + +static GtkWidget * +new_fractalexplorer_obj(gchar * name) +{ + fractalexplorerOBJ * fractalexplorer; + GtkWidget * new_list_item; + /* Create a new entry */ + + fractalexplorer = fractalexplorer_new(); + + if(!name) + name = msg[lng][MSG_NEWFRAC]; + + fractalexplorer->draw_name = g_strdup(name); + + /* Leave options as before */ + pic_obj = current_obj = fractalexplorer; + + new_list_item = fractalexplorer_list_add(fractalexplorer); + +/* obj_creating = tmp_line = NULL; */ + + /* Redraw areas */ + /* update_draw_area(fractalexplorer_preview,NULL); */ + list_button_update(fractalexplorer); + return(new_list_item); +} + + +static gint +new_button_press(GtkWidget *widget, + GdkEventButton *event, + gpointer data) +{ + GtkWidget * new_list_item; + + new_list_item = new_fractalexplorer_obj((gchar*)data); + fractalexplorer_dialog_edit_list(new_list_item,current_obj,TRUE); + + return(FALSE); +} + +static void +fractalexplorer_rescan_cancel_callback (GtkWidget *w, + gpointer client_data) +{ + gtk_widget_destroy (GTK_WIDGET (client_data)); +} + +void +clear_list_items(GtkList *list) +{ + gtk_list_clear_items(list,0,-1); +} + +/* + * Load all fractalexplorer, which are founded in fractalexplorer-path-list, into fractalexplorer_list. + * fractalexplorer-path-list must be initialized first. (plug_in_parse_fractalexplorer_path ()) + * based on code from Gflare. + */ + +gint +fractalexplorer_list_pos(fractalexplorerOBJ *fractalexplorer) +{ + fractalexplorerOBJ *g; + int n; + GList *tmp; + + n = 0; + + tmp = fractalexplorer_list; + + while (tmp) + { + g = tmp->data; + + if (strcmp (fractalexplorer->draw_name, g->draw_name) <= 0) + break; + n++; + tmp = tmp->next; + } + + return(n); +} + +gint +gradient_list_pos(gradientOBJ *gradi) +{ + gradientOBJ *g; + int n; + GList *tmp; + + n = 0; + + tmp = gradient_list; + + while (tmp) + { + g = tmp->data; + + if (strcmp (gradi->draw_name, g->draw_name) <= 0) + break; + n++; + tmp = tmp->next; + } + + return(n); +} + + +gint +fractalexplorer_list_insert (fractalexplorerOBJ *fractalexplorer) +{ + int n; + + /* + * Insert fractalexplorers in alphabetical order + */ + + n = fractalexplorer_list_pos(fractalexplorer); + + fractalexplorer_list = g_list_insert (fractalexplorer_list, fractalexplorer, n); + + return n; +} + +gint +gradient_list_insert (gradientOBJ *gradi) +{ + int n; + + /* + * Insert gradis in alphabetical order + */ + + n = gradient_list_pos(gradi); + + gradient_list = g_list_insert (gradient_list, gradi, n); + + return n; +} + +GtkWidget* +fractalexplorer_list_item_new_with_label_and_pixmap (fractalexplorerOBJ *obj, gchar *label, GtkWidget *pix_widget) +{ + GtkWidget *list_item; + GtkWidget *label_widget; + GtkWidget *alignment; + GtkWidget *hbox; + + hbox = gtk_hbox_new(FALSE,1); + gtk_widget_show(hbox); + + list_item = gtk_list_item_new (); + label_widget = gtk_label_new (label); + gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); + + alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_set_border_width (GTK_CONTAINER (alignment), 0); + gtk_widget_show(alignment); + + gtk_box_pack_start(GTK_BOX(hbox),pix_widget,FALSE,FALSE,0); + gtk_container_add (GTK_CONTAINER (hbox), label_widget); + gtk_container_add (GTK_CONTAINER (list_item), hbox); + + gtk_widget_show (obj->label_widget = label_widget); + gtk_widget_show (obj->pixmap_widget = pix_widget); + gtk_widget_show (obj->list_item = list_item); + + return list_item; +} + +GtkWidget* +gradient_list_item_new_with_label_and_pixmap (gradientOBJ *obj, gchar *label, GtkWidget *pix_widget) +{ + GtkWidget *list_item; + GtkWidget *label_widget; + GtkWidget *alignment; + GtkWidget *hbox; + + hbox = gtk_hbox_new(FALSE,1); + gtk_widget_show(hbox); + + list_item = gtk_list_item_new (); + label_widget = gtk_label_new (label); + gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); + + alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_set_border_width (GTK_CONTAINER (alignment), 0); + gtk_widget_show(alignment); + + gtk_box_pack_start(GTK_BOX(hbox),pix_widget,FALSE,FALSE,0); + gtk_container_add (GTK_CONTAINER (hbox), label_widget); + gtk_container_add (GTK_CONTAINER (list_item), hbox); + + gtk_widget_show (obj->label_widget = label_widget); + gtk_widget_show (obj->pixmap_widget = pix_widget); + gtk_widget_show (obj->list_item = list_item); + + return list_item; +} + + +GtkWidget* +fractalexplorer_new_pixmap(GtkWidget *list, char **pixdata) +{ + GtkWidget *pixmap_widget; + GdkPixmap *pixmap; + GdkColor transparent; + GdkBitmap *mask=NULL; + GdkColormap *colormap; + + colormap = gtk_widget_get_default_colormap (); + + pixmap = gdk_pixmap_colormap_create_from_xpm_d(list->window, + colormap, + &mask, + &transparent, + pixdata); + + /* pixmap = gdk_pixmap_create_from_xpm_d(list->window,&mask,&transparent,pixdata); */ + pixmap_widget = gtk_pixmap_new(pixmap,mask); + gtk_widget_show(pixmap_widget); + return(pixmap_widget); +} + + +static GtkWidget * +fractalexplorer_list_add(fractalexplorerOBJ *obj) +{ + GList *list; + gint pos; + GtkWidget *list_item; + GtkWidget *list_pix; + + list_pix = fractalexplorer_new_pixmap(fractalexplorer_gtk_list,Floppy6_xpm); + list_item = fractalexplorer_list_item_new_with_label_and_pixmap(obj,obj->draw_name,list_pix); + + gtk_object_set_user_data (GTK_OBJECT (list_item), (gpointer)obj); + + pos = fractalexplorer_list_insert(obj); + + list = g_list_append(NULL, list_item); + gtk_list_insert_items(GTK_LIST(fractalexplorer_gtk_list), list, pos); + gtk_widget_show (list_item); + gtk_list_select_item(GTK_LIST(fractalexplorer_gtk_list), pos); + + gtk_signal_connect(GTK_OBJECT(list_item), "button_press_event", + (GtkSignalFunc) list_button_press, + (gpointer)obj); + + return(list_item); +} + + + + +void +list_button_update(fractalexplorerOBJ *obj) +{ + g_return_if_fail (obj != NULL); + pic_obj = (fractalexplorerOBJ *)obj; + /* Draw xxxxxxxxxxxxxxxxxxxx */ +} + + + + + + +fractalexplorerOBJ * +fractalexplorer_new(void) +{ + fractalexplorerOBJ * new; + + new = g_new0(fractalexplorerOBJ,1); + return(new); +} + +gradientOBJ * +gradient_new(void) +{ + gradientOBJ * new; + + new = g_new0(gradientOBJ,1); + return(new); +} + +void +build_list_items(GtkWidget *list) +{ + GList *tmp = fractalexplorer_list; + GtkWidget *list_item; + GtkWidget *list_pix; + fractalexplorerOBJ *g; + + while(tmp) + { + g = tmp->data; + + if(g->obj_status & fractalexplorer_READONLY) + list_pix = fractalexplorer_new_pixmap(list,mini_cross_xpm); + else + list_pix = fractalexplorer_new_pixmap(list,bluedot_xpm); + + list_item = fractalexplorer_list_item_new_with_label_and_pixmap(g,g->draw_name,list_pix); + gtk_object_set_user_data (GTK_OBJECT (list_item), (gpointer)g); + gtk_list_append_items (GTK_LIST (list), g_list_append(NULL,list_item)); + + gtk_signal_connect(GTK_OBJECT(list_item), "button_press_event", + (GtkSignalFunc) list_button_press, + (gpointer)g); + gtk_widget_show (list_item); + + tmp = tmp->next; + } +} + +void +gradient_build_list_items(GtkWidget *list) +{ + GList *tmp = gradient_list; + GtkWidget *list_item; + GtkWidget *list_pix; + gradientOBJ *g; + + while(tmp) + { + g = tmp->data; + + if(g->obj_status & gradient_GRADIENTEDITOR) + list_pix = fractalexplorer_new_pixmap(list,greendot_xpm); + else + list_pix = fractalexplorer_new_pixmap(list,bluedot_xpm); + + list_item = gradient_list_item_new_with_label_and_pixmap(g,g->draw_name,list_pix); + gtk_object_set_user_data (GTK_OBJECT (list_item), (gpointer)g); + gtk_list_append_items (GTK_LIST (list), g_list_append(NULL,list_item)); + + gtk_signal_connect(GTK_OBJECT(list_item), "button_press_event", + (GtkSignalFunc) gradient_list_button_press, + (gpointer)g); + gtk_widget_show (list_item); + + tmp = tmp->next; + } +} + +/* + +static void +fractalexplorer_save_menu_callback(GtkWidget *widget, gpointer data) +{ + fractalexplorerOBJ * real_current = current_obj; + + current_obj = fractalexplorer_obj_for_menu; + + fractalexplorer_save(); + + current_obj = real_current; +} + +static void +fractalexplorer_load_menu_callback(GtkWidget *widget, gpointer data) +{ + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); +} + +static void +fractalexplorer_rename_menu_callback(GtkWidget *widget, gpointer data) +{ + create_file_selection(fractalexplorer_obj_for_menu,fractalexplorer_obj_for_menu->filename); +} + +static void +fractalexplorer_copy_menu_callback(GtkWidget *widget, gpointer data) +{ + gchar *new_name = g_malloc(strlen(fractalexplorer_obj_for_menu->draw_name) + 6); + + sprintf(new_name,msg[lng][MSG_COPYNAME],fractalexplorer_obj_for_menu->draw_name); + new_fractalexplorer_obj(new_name); + g_free(new_name); + + current_obj->opts = fractalexplorer_obj_for_menu->opts; + + update_draw_area(fractalexplorer_preview,NULL); + list_button_update(current_obj); +} + +*/ + + +/* + +static void +fractalexplorer_op_menu_create(GtkWidget *window) +{ + GtkWidget *menu_item; + GtkAcceleratorTable *accelerator_table; + + fractalexplorer_op_menu = gtk_menu_new(); + + accelerator_table = gtk_accelerator_table_new(); + gtk_menu_set_accelerator_table(GTK_MENU(fractalexplorer_op_menu), + accelerator_table); + gtk_window_add_accelerator_table(GTK_WINDOW(window),accelerator_table); + + save_menu_item = menu_item = gtk_menu_item_new_with_label(msg[lng][MSG_SAVE]); + gtk_menu_append(GTK_MENU(fractalexplorer_op_menu),menu_item); + gtk_widget_show(menu_item); + + gtk_signal_connect(GTK_OBJECT(menu_item),"activate", + (GtkSignalFunc)fractalexplorer_save_menu_callback, + NULL); + + gtk_widget_install_accelerator(menu_item, + accelerator_table, + "activate",'S',0); + + menu_item = gtk_menu_item_new_with_label(msg[lng][MSG_SAVEAS]); + gtk_menu_append(GTK_MENU(fractalexplorer_op_menu),menu_item); + gtk_widget_show(menu_item); + gtk_signal_connect(GTK_OBJECT(menu_item),"activate", + (GtkSignalFunc)fractalexplorer_rename_menu_callback, + NULL); + gtk_widget_install_accelerator(menu_item, + accelerator_table, + "activate",'A',0); + + menu_item = gtk_menu_item_new_with_label(msg[lng][MSG_COPY]); + gtk_menu_append(GTK_MENU(fractalexplorer_op_menu),menu_item); + gtk_widget_show(menu_item); + gtk_signal_connect(GTK_OBJECT(menu_item),"activate", + (GtkSignalFunc)fractalexplorer_copy_menu_callback, + NULL); + gtk_widget_install_accelerator(menu_item, + accelerator_table, + "activate",'C',0); + + menu_item = gtk_menu_item_new_with_label(msg[lng][MSG_LOAD]); + gtk_menu_append(GTK_MENU(fractalexplorer_op_menu),menu_item); + gtk_widget_show(menu_item); + gtk_signal_connect(GTK_OBJECT(menu_item),"activate", + (GtkSignalFunc)fractalexplorer_load_menu_callback, + NULL); + gtk_widget_install_accelerator(menu_item, + accelerator_table, + "activate",'L',0); + +} + + +static void +fractalexplorer_op_menu_popup(gint button, guint32 activate_time,fractalexplorerOBJ *obj) +{ + fractalexplorer_obj_for_menu = obj; + + if(obj->obj_status & fractalexplorer_READONLY) + { + gtk_widget_set_sensitive(save_menu_item,FALSE); + } + else + { + gtk_widget_set_sensitive(save_menu_item,TRUE); + } + + gtk_menu_popup(GTK_MENU(fractalexplorer_op_menu),NULL,NULL,NULL,NULL,button,activate_time); +} + +*/ + +static gint +list_button_press(GtkWidget *widget, + GdkEventButton *event, + gpointer data) +{ + + fractalexplorerOBJ * sel_obj; + + switch (event->type) + { + case GDK_BUTTON_PRESS: + /* + if(event->button == 3) + { + fractalexplorer_op_menu_popup(event->button,event->time,(fractalexplorerOBJ *)data); + return(FALSE); + } +*/ + list_button_update((fractalexplorerOBJ *)data); + break; + case GDK_2BUTTON_PRESS: + + sel_obj = (fractalexplorerOBJ *)data; + + if(sel_obj) { + current_obj=sel_obj; + wvals=current_obj->opts; + dialog_change_scale(); + set_cmap_preview(); + dialog_update_preview(); } +/* new_obj_2edit(sel_obj); */ + else + g_warning(msg[lng][MSG_NULLLIST]); + + break; + default: + printf(msg[lng][MSG_UNKNOWN_EVENT]); + break; + } + + return(FALSE); +} + + + +/* + * Query gimprc for fractalexplorer-path, and parse it. + * This code is based on script_fu_find_scripts () + * and the Gflare plugin. + */ + +void +plug_in_parse_fractalexplorer_path() +{ + GParam *return_vals; + gint nreturn_vals; + gchar *path_string; + gchar *home; + gchar *path; + gchar *token; + struct stat filestat; + gint err; + gchar buf[256]; + + if(fractalexplorer_path_list) + g_list_free(fractalexplorer_path_list); + + fractalexplorer_path_list = NULL; + + return_vals = gimp_run_procedure ("gimp_gimprc_query", + &nreturn_vals, + PARAM_STRING, "fractalexplorer-path", + PARAM_END); + + if (return_vals[0].data.d_status != STATUS_SUCCESS || return_vals[1].data.d_string == NULL) + { + g_warning(msg[lng][MSG_MISSING_GIMPRC]); + create_warn_dialog(msg[lng][MSG_MISSING_GIMPRC]); + + gimp_destroy_params (return_vals, nreturn_vals); + return; + } + + path_string = g_strdup (return_vals[1].data.d_string); + gimp_destroy_params (return_vals, nreturn_vals); + + /* Set local path to contain temp_path, where (supposedly) + * there may be working files. + */ + home = g_get_home_dir (); + + /* Search through all directories in the path */ + + token = strtok (path_string, G_SEARCHPATH_SEPARATOR_S); + + while (token) + { + if (*token == '\0') + { + token = strtok (NULL, G_SEARCHPATH_SEPARATOR_S); + continue; + } + + if (*token == '~') + { + path = g_malloc (strlen (home) + strlen (token) + 2); + sprintf (path, "%s%s", home, token + 1); + } + else + { + path = g_malloc (strlen (token) + 2); + strcpy (path, token); + } /* else */ + + /* Check if directory exists */ + err = stat (path, &filestat); + + if (!err && S_ISDIR (filestat.st_mode)) + { + if (path[strlen (path) - 1] != G_DIR_SEPARATOR) + strcat (path, G_DIR_SEPARATOR_S); + + fractalexplorer_path_list = g_list_append (fractalexplorer_path_list, path); + } + else + { + sprintf(buf,msg[lng][MSG_WRONGPATH], path); + g_warning(buf); + create_warn_dialog(buf); + g_free (path); + } + token = strtok (NULL, G_SEARCHPATH_SEPARATOR_S); + } + g_free (path_string); +} + + +void +fractalexplorer_free(fractalexplorerOBJ * fractalexplorer) +{ + g_assert (fractalexplorer != NULL); + + if(fractalexplorer->name) + g_free(fractalexplorer->name); + if(fractalexplorer->filename) + g_free(fractalexplorer->filename); + if(fractalexplorer->draw_name) + g_free(fractalexplorer->draw_name); + g_free (fractalexplorer); +} + +void +gradient_free(gradientOBJ * gradi) +{ + g_assert (gradi != NULL); + + if(gradi->name) + g_free(gradi->name); + if(gradi->filename) + g_free(gradi->filename); + if(gradi->draw_name) + g_free(gradi->draw_name); + g_free (gradi); +} + +void +fractalexplorer_free_everything(fractalexplorerOBJ * fractalexplorer) +{ + g_assert (fractalexplorer != NULL); + + if(fractalexplorer->filename) + { + remove(fractalexplorer->filename); + } + fractalexplorer_free(fractalexplorer); +} + +void +gradient_free_everything(gradientOBJ * gradi) +{ + g_assert (gradi != NULL); + + if(gradi->filename) + { + remove(gradi->filename); + } + gradient_free(gradi); +} + +void +fractalexplorer_list_free_all () +{ + GList * list; + fractalexplorerOBJ * fractalexplorer; + + list = fractalexplorer_list; + while (list) + { + fractalexplorer = (fractalexplorerOBJ *) list->data; + fractalexplorer_free (fractalexplorer); + list = list->next; + } + + g_list_free (fractalexplorer_list); + fractalexplorer_list = NULL; +} + +void +gradient_list_free_all () +{ + GList * list; + gradientOBJ * gradi; + + list = gradient_list; + while (list) + { + gradi = (gradientOBJ *) list->data; + gradient_free (gradi); + list = list->next; + } + + g_list_free (gradient_list); + gradient_list = NULL; +} + +fractalexplorerOBJ * +fractalexplorer_load (gchar *filename, gchar *name) +{ + fractalexplorerOBJ * fractalexplorer; + FILE * fp; + gchar load_buf[MAX_LOAD_LINE]; + + g_assert (filename != NULL); + fp = fopen (filename, "r"); + if (!fp) + { + g_warning (msg[lng][MSG_OPENERROR], filename); + return NULL; + } + + fractalexplorer = fractalexplorer_new(); + + fractalexplorer->name = g_strdup(name); + fractalexplorer->draw_name = g_strdup(name); + fractalexplorer->filename = g_strdup(filename); + + + /* HEADER + * draw_name + * version + * obj_list + */ + + get_line(load_buf,MAX_LOAD_LINE,fp,1); + + if(strncmp(fractalexplorer_HEADER,load_buf,strlen(load_buf))) + { + gchar err[256]; + sprintf(err,msg[lng][MSG_WRONGFILETYPE],fractalexplorer->filename); + create_warn_dialog(err); + fclose(fp); + return(NULL); + } + + if(load_options(fractalexplorer,fp)) + { + /* waste some mem */ + gchar err[256]; + sprintf(err, + msg[lng][MSG_CORRUPTFILE], + filename, + line_no); + create_warn_dialog(err); + fclose(fp); + return(NULL); + } + + fclose(fp); + + if(!pic_obj) + pic_obj = fractalexplorer; + + fractalexplorer->obj_status = fractalexplorer_OK; + + return(fractalexplorer); +} + + +gradientOBJ * +gradient_load (gchar *filename, gchar *name) +{ + gradientOBJ * gradi; + FILE * fp; + gchar load_buf[MAX_LOAD_LINE]; + + g_assert (filename != NULL); + + fp = fopen (filename, "r"); + if (!fp) + { + g_warning (msg[lng][MSG_OPENERROR], filename); + return NULL; + } + + gradi = gradient_new(); + + gradi->name = g_strdup(name); + gradi->draw_name = g_strdup(name); + gradi->filename = g_strdup(filename); + + + /* HEADER + * draw_name + * version + * obj_list + */ + + get_line(load_buf,MAX_LOAD_LINE,fp,1); + + if(strncmp(fractalexplorer_HEADER,load_buf,strlen(load_buf))) + { + gchar err[256]; + sprintf(err,msg[lng][MSG_WRONGFILETYPE],gradi->filename); + create_warn_dialog(err); + return(NULL); + } + +/* + if(gradient_load_options(gradient,fp)) + { + gchar err[256]; + sprintf(err, + msg[lng][MSG_CORRUPTFILE], + filename, + line_no); + create_warn_dialog(err); + return(NULL); + } +*/ + fclose(fp); + /* + if(!pic_obj) + pic_obj = fractalexplorer; + + fractalexplorer->obj_status = fractalexplorer_OK; +*/ + return(gradi); +} + +static void +fractalexplorer_rescan_file_selection_ok(GtkWidget *w, + GtkFileSelection *fs, + gpointer data) +{ + GtkWidget *list_item; + GtkWidget *lw = (GtkWidget *)gtk_object_get_user_data(GTK_OBJECT(fs)); + gchar * filenamebuf; + struct stat filestat; + gint err; + + filenamebuf = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + + err = stat(filenamebuf, &filestat); + + if (!S_ISDIR(filestat.st_mode)) + { + g_warning(msg[lng][MSG_NOTDIR],filenamebuf); + } + else + { + + list_item = gtk_list_item_new_with_label(filenamebuf); + gtk_widget_show(list_item); + + gtk_list_prepend_items(GTK_LIST(lw),g_list_append(NULL, list_item)); + + rescan_list = g_list_prepend(rescan_list,g_strdup(filenamebuf)); + } + + gtk_widget_destroy(GTK_WIDGET(fs)); +} + +void +fractalexplorer_list_load_all(GList *plist) +{ + fractalexplorerOBJ * fractalexplorer; + GList * list; + gchar * path; + gchar * filename; + DIR * dir; + struct dirent *dir_ent; + struct stat filestat; + gint err; + /* Make sure to clear any existing fractalexplorers */ + current_obj = pic_obj = NULL; + fractalexplorer_list_free_all (); + list = plist; + while (list) + { + path = list->data; + list = list->next; + + /* Open directory */ + dir = opendir (path); + + if (!dir) + g_warning(msg[lng][MSG_DIRREADERROR], path); + else + { + while ((dir_ent = readdir (dir))) + { + filename = g_malloc (strlen(path) + strlen (dir_ent->d_name) + 1); + + sprintf (filename, "%s%s", path, dir_ent->d_name); + + /* Check the file and see that it is not a sub-directory */ + err = stat (filename, &filestat); + + if (!err && S_ISREG (filestat.st_mode)) + { + + fractalexplorer = fractalexplorer_load (filename, dir_ent->d_name); + + if (fractalexplorer) + { + /* Read only ?*/ + if(access(filename,W_OK)) + fractalexplorer->obj_status |= fractalexplorer_READONLY; + + fractalexplorer_list_insert (fractalexplorer); + } + } + + g_free (filename); + } /* while */ + closedir (dir); + } /* else */ + } + + if(!fractalexplorer_list) + { + /* lets have at least one! */ + fractalexplorer = fractalexplorer_new(); + fractalexplorer->draw_name = g_strdup(msg[lng][MSG_FIRSTFRACTAL]); + fractalexplorer_list_insert(fractalexplorer); + } + pic_obj = current_obj = fractalexplorer_list->data; /* set to first entry */ + +} + +void +gradient_list_load_all(GList *plist) +{ + gradientOBJ * gradi; + GList * list; + gchar * path; + gchar * filename; + char **gradients=NULL; + DIR * dir; + struct dirent *dir_ent; + struct stat filestat; + gint err; + gint gradnumber=200,i; + /* Make sure to clear any existing gradients */ + gradient_list_free_all (); + list = plist; + while (list) + { + path = list->data; + list = list->next; + + /* Open directory */ + dir = opendir (path); + + if (!dir) + g_warning(msg[lng][MSG_DIRREADERROR], path); + else + { + while ((dir_ent = readdir (dir))) + { + filename = g_malloc (strlen(path) + strlen (dir_ent->d_name) + 1); + + sprintf (filename, "%s%s", path, dir_ent->d_name); + + /* Check the file and see that it is not a sub-directory */ + err = stat (filename, &filestat); + + if (!err && S_ISREG (filestat.st_mode)) + { + + gradi = gradient_load (filename, dir_ent->d_name); + + if (gradi) + { + gradient_list_insert (gradi); + } + } + + g_free (filename); + } /* while */ + closedir (dir); + } /* else */ + } + + gradients=gimp_gradients_get_list(&gradnumber); + for (i=0; i< gradnumber; i++) + { + gradi = gradient_new(); + gradi->name = gradi->draw_name = gradi->filename=gradients[i]; + if (gradi) + { + gradi->obj_status=gradient_GRADIENTEDITOR; + gradient_list_insert (gradi); + } + } + + if(!gradient_list) + { + /* lets have at least one! */ + gradi = gradient_new(); + gradi->draw_name = g_strdup("Gradient"); + gradient_list_insert(gradi); + } +/* pic_obj = current_obj = gradient_list->data; set to first entry */ +} + + +static GtkWidget * +add_objects_list () +{ + GtkWidget *table; + GtkWidget *frame; + GtkWidget *list_frame; + GtkWidget *scrolled_win; + GtkWidget *list; + GtkWidget *button; + + frame = gtk_frame_new(msg[lng][MSG_CHOOSE_FRACTAL]); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width(GTK_CONTAINER(frame), 10); + gtk_widget_show(frame); + + table = gtk_table_new (6, 4, FALSE); + gtk_container_set_border_width(GTK_CONTAINER(table), 10); + gtk_table_set_row_spacings(GTK_TABLE(table), 10); +/* gtk_table_set_col_spacings(GTK_TABLE(table), 10); */ + gtk_widget_show(table); + + delete_frame_to_freeze = list_frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type (GTK_FRAME (list_frame), GTK_SHADOW_ETCHED_IN); + gtk_widget_show(list_frame); + + scrolled_win = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (list_frame), scrolled_win); + gtk_widget_show (scrolled_win); + + fractalexplorer_gtk_list = list = gtk_list_new (); + /* gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_MULTIPLE); */ + gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), + list); + gtk_widget_show (list); + /* Load saved objects */ + fractalexplorer_list_load_all(fractalexplorer_path_list); + /* Put list in */ + build_list_items(list); + + /* Put buttons in */ + button = gtk_button_new_with_label (msg[lng][MSG_RESCAN]); + gtk_widget_show(button); + gtk_signal_connect (GTK_OBJECT (button), "button_press_event", + (GtkSignalFunc) rescan_button_press, + NULL); + gtk_tooltips_set_tip(tips,button,msg[lng][MSG_RESCAN_COMMENT], NULL); + gtk_table_attach(GTK_TABLE(table), button, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); + +/* + button = gtk_button_new_with_label (msg[lng][MSG_NEW]); + gtk_signal_connect (GTK_OBJECT (button), "button_press_event", + (GtkSignalFunc) new_button_press, + "My New Fractal"); + gtk_widget_show(button); + gtk_tooltips_set_tip(tips,button,msg[lng][MSG_NEW_COMMENT], NULL); + gtk_table_attach(GTK_TABLE(table), button, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); + + button = gtk_button_new_with_label (msg[lng][MSG_RENAME]); + gtk_widget_show(button); + gtk_signal_connect (GTK_OBJECT (button), "button_press_event", + (GtkSignalFunc) rename_button_press, + (gpointer) list); + gtk_tooltips_set_tip(tips,button,msg[lng][MSG_RENAME_COMMENT], NULL); + gtk_table_attach(GTK_TABLE(table), button, 2, 3, 2, 3, GTK_FILL, GTK_FILL, 0, 0); +*/ + + button = gtk_button_new_with_label (msg[lng][MSG_DEL]); + gtk_signal_connect (GTK_OBJECT (button), "button_press_event", + (GtkSignalFunc) fractalexplorer_delete_fractalexplorer_callback, + (gpointer)list); + gtk_widget_show(button); + gtk_tooltips_set_tip(tips,button,msg[lng][MSG_DELETE_COMMENT], NULL); + gtk_table_attach(GTK_TABLE(table), button, 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); + + /* Attach the frame for the list Show the widgets */ + + gtk_table_attach(GTK_TABLE(table), list_frame, 0, 2, 0, 3, GTK_FILL|GTK_EXPAND , GTK_FILL|GTK_EXPAND, 0, 0); + + cmap_preview_long = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(cmap_preview_long), GR_WIDTH, 32); + gtk_table_attach(GTK_TABLE(table), cmap_preview_long, 0, 2, 4, 5, GTK_FILL|GTK_EXPAND , GTK_FILL|GTK_EXPAND, 0, 0); + gtk_widget_show(cmap_preview_long); + + gtk_container_add (GTK_CONTAINER (frame), table); + return (frame); +} + + + +static GtkWidget * +add_gradients_list () +{ + GtkWidget *table; + GtkWidget *frame; + GtkWidget *list_frame; + GtkWidget *scrolled_win; + GtkWidget *list; + + frame = gtk_frame_new(msg[lng][MSG_CHOOSE_GRADIENT]); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width(GTK_CONTAINER(frame), 10); + gtk_widget_show(frame); + + table = gtk_table_new (6, 4, FALSE); + + gtk_container_set_border_width(GTK_CONTAINER(table), 10); + gtk_table_set_row_spacings(GTK_TABLE(table), 10); +/* gtk_table_set_col_spacings(GTK_TABLE(table), 10); */ + gtk_widget_show(table); + + list_frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type (GTK_FRAME (list_frame), GTK_SHADOW_ETCHED_IN); + gtk_widget_show(list_frame); + + scrolled_win = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (list_frame), scrolled_win); + gtk_widget_show (scrolled_win); + + list = gtk_list_new (); + gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_BROWSE); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), + list); + gtk_widget_show (list); + /* Load saved objects */ + + gradient_list_load_all(fractalexplorer_path_list); + /* Put list in */ + gradient_build_list_items(list); + + /* Put buttons in + button = gtk_button_new_with_label (msg[lng][MSG_RESCAN]); + gtk_widget_show(button); + gtk_signal_connect (GTK_OBJECT (button), "button_press_event", + (GtkSignalFunc) rescan_button_press, + NULL); + gtk_tooltips_set_tips(tips,button,msg[lng][MSG_RESCAN_COMMENT]); + gtk_table_attach(GTK_TABLE(table), button, 2, 3, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + */ + + /* Attach the frame for the list Show the widgets */ + + gtk_table_attach(GTK_TABLE(table), list_frame, 0, 3, 0, 4, GTK_FILL|GTK_EXPAND , GTK_FILL|GTK_EXPAND, 1, 1); + + cmap_preview_long2 = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(cmap_preview_long2), GR_WIDTH, 32); + gtk_table_attach(GTK_TABLE(table), cmap_preview_long2, 0, 3, 4, 5, GTK_FILL|GTK_EXPAND , GTK_FILL|GTK_EXPAND, 1, 1); + gtk_widget_show(cmap_preview_long2); + + gtk_container_add (GTK_CONTAINER (frame), table); + return (frame); +} + + + +static void +fractalexplorer_rescan_ok_callback (GtkWidget *w, + gpointer client_data) +{ + GList *list; + + list = rescan_list; + while (list) + { + list = list->next; + } + list = fractalexplorer_path_list; + while (list) + { + rescan_list = g_list_append(rescan_list,g_strdup(list->data)); + list = list->next; + } + clear_list_items(GTK_LIST(fractalexplorer_gtk_list)); + fractalexplorer_list_load_all(rescan_list); + build_list_items(fractalexplorer_gtk_list); + list_button_update(current_obj); + gtk_widget_destroy (GTK_WIDGET (client_data)); +} + + +static void +fractalexplorer_rescan_add_entry_callback (GtkWidget *w, + gpointer client_data) +{ + static GtkWidget *window = NULL; + + /* Call up the file sel dialouge */ + window = gtk_file_selection_new (msg[lng][MSG_ADDPATH]); + gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE); + gtk_object_set_user_data(GTK_OBJECT(window),(gpointer)client_data); + + + gtk_signal_connect (GTK_OBJECT (window), "destroy", + (GtkSignalFunc) destroy_window, + &window); + + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (window)->ok_button), + "clicked", (GtkSignalFunc) fractalexplorer_rescan_file_selection_ok, + (gpointer)window); + + gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION (window)->cancel_button), + "clicked", (GtkSignalFunc) gtk_widget_destroy, + GTK_OBJECT(window)); + gtk_widget_show(window); +} + + +static void +fractalexplorer_rescan_list (void) +{ + GtkWidget *vbox; + GtkWidget *button; + GtkWidget *dlg; + GtkWidget *list_frame; + GtkWidget *scrolled_win; + GtkWidget *list_widget; + GList *list; + + /* the dialog */ + dlg = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dlg), msg[lng][MSG_RESCANTITLE1]); + gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + + /* the main vbox */ + vbox = gtk_vbox_new (FALSE, 1); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 2); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0); + + /* path list */ + list_frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type (GTK_FRAME (list_frame), GTK_SHADOW_ETCHED_IN); + gtk_widget_show(list_frame); + + scrolled_win = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (list_frame), scrolled_win); + gtk_widget_show (scrolled_win); + + list_widget = gtk_list_new (); + gtk_list_set_selection_mode (GTK_LIST (list_widget), GTK_SELECTION_BROWSE); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_win), + list_widget); + gtk_widget_show (list_widget); + gtk_box_pack_start (GTK_BOX (vbox), list_frame, TRUE, TRUE, 0); + + list = fractalexplorer_path_list; + while (list) + { + GtkWidget *list_item; + list_item = gtk_list_item_new_with_label(list->data); + gtk_widget_show(list_item); + gtk_container_add (GTK_CONTAINER (list_widget), list_item); + list = list->next; + } + + button = gtk_button_new_with_label (msg[lng][MSG_OK]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc)fractalexplorer_rescan_ok_callback, + (gpointer)dlg); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + /* Clear the old list out */ + if((list = rescan_list)) + { + while (list) + { + g_free(list->data); + list = list->next; + } + + g_list_free(rescan_list); + rescan_list = NULL; + } + + button = gtk_button_new_with_label (msg[lng][MSG_ADDDIR]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc)fractalexplorer_rescan_add_entry_callback, + (gpointer)list_widget); + + gtk_object_set_user_data(GTK_OBJECT(dlg),(gpointer)list_widget); + + + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); + gtk_widget_show (button); + + button = gtk_button_new_with_label (msg[lng][MSG_CANCEL]); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc)fractalexplorer_rescan_cancel_callback, + (gpointer)dlg); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); + gtk_widget_show (button); + + gtk_widget_show (vbox); + gtk_widget_show (dlg); +} + + +static gint +rescan_button_press(GtkWidget *widget, + GdkEventButton *event, + gpointer data) +{ + fractalexplorer_rescan_list(); + return(FALSE); +} + + +static gint +delete_button_press_ok(GtkWidget *widget, + gpointer data) +{ + gint pos; + GList * sellist; + fractalexplorerOBJ * sel_obj; + GtkWidget *list = (GtkWidget *)data; + + /* Must update which object we are editing */ + /* Get the list and which item is selected */ + /* Only allow single selections */ + + sellist = GTK_LIST(list)->selection; + + g_print ("list: %i\n", g_list_length (sellist)); + + sel_obj = (fractalexplorerOBJ *)gtk_object_get_user_data(GTK_OBJECT((GtkWidget *)(sellist->data))); + + pos = gtk_list_child_position(GTK_LIST(fractalexplorer_gtk_list),sellist->data); + + /* Delete the current item + asssociated file */ + gtk_list_clear_items(GTK_LIST (fractalexplorer_gtk_list),pos,pos+1); + /* Shadow copy for ordering info */ + fractalexplorer_list = g_list_remove(fractalexplorer_list,sel_obj); +/* + if(sel_obj == current_obj) + { + clear_undo(); + } +*/ + /* Free current obj */ + fractalexplorer_free_everything(sel_obj); + + /* Select previous one */ + if (pos > 0) + pos--; + + if((pos == 0) && (g_list_length(fractalexplorer_list) == 0)) + { + /* Warning - we have a problem here + * since we are not really "creating an entry" + * why call fractalexplorer_new? + */ + new_button_press(NULL,NULL,NULL); + } + + gtk_widget_destroy(delete_dialog); + gtk_widget_set_sensitive(delete_frame_to_freeze,TRUE); + + delete_dialog = NULL; + + gtk_list_select_item(GTK_LIST(fractalexplorer_gtk_list), pos); + + current_obj = g_list_nth_data(fractalexplorer_list,pos); + + /* + draw xxxxxxxxxxxxxxxx + update_draw_area(fractalexplorer_preview,NULL); + */ + + list_button_update(current_obj); + + + return(FALSE); +} diff --git a/plug-ins/FractalExplorer/FractalExplorer.h b/plug-ins/FractalExplorer/FractalExplorer.h new file mode 100644 index 0000000000..35be64715f --- /dev/null +++ b/plug-ins/FractalExplorer/FractalExplorer.h @@ -0,0 +1,357 @@ +/********************************************************************** + Magic numbers + *********************************************************************/ + +#define PREVIEW_SIZE 128 +#define SCALE_WIDTH 200 +#define ENTRY_WIDTH 60 +#define MAX_LOAD_LINE 256 +#define GR_WIDTH 325 + +#define SINUS 0 +#define COSINUS 1 +#define NONE 2 + +#define FRACTAL_HEADER "Fractal Explorer Plug-In Version 2 - (c) 1997 \n" +#define fractalexplorer_HEADER "Fractal Explorer Plug-In Version 2 - (c) 1997 \n" + +/********************************************************************** + Types + *********************************************************************/ + +typedef struct { + gint fractaltype; + gdouble xmin; + gdouble xmax; + gdouble ymin; + gdouble ymax; + gdouble iter; + gdouble cx; + gdouble cy; + gint colormode; + gdouble redstretch; + gdouble greenstretch; + gdouble bluestretch; + gint redmode; + gint greenmode; + gint bluemode; + gint redinvert; + gint greeninvert; + gint blueinvert; + gint alwayspreview; + gint language; + +} explorer_vals_t; + +typedef struct { + GtkWidget *preview; + guchar *wimage; + gint run; +} explorer_interface_t; + +typedef int clrmap[256][3]; + +typedef struct { + GtkWidget *text; + GtkAdjustment *data; +} scaledata; + +typedef struct _DialogElements DialogElements; + + +struct _DialogElements { + GtkWidget *type_mandelbrot; + GtkWidget *type_julia; + GtkWidget *type_barnsley1; + GtkWidget *type_barnsley2; + GtkWidget *type_barnsley3; + GtkWidget *type_spider; + GtkWidget *type_manowar; + GtkWidget *type_lambda; + GtkWidget *type_sierpinski; + scaledata xmin; + scaledata xmax; + scaledata ymin; + scaledata ymax; + scaledata iter; + scaledata cx; + scaledata cy; + scaledata red; + scaledata green; + scaledata blue; + GtkWidget *redmodecos; + GtkWidget *redmodesin; + GtkWidget *redmodenone; + GtkWidget *greenmodecos; + GtkWidget *greenmodesin; + GtkWidget *greenmodenone; + GtkWidget *bluemodecos; + GtkWidget *bluemodesin; + GtkWidget *bluemodenone; + GtkWidget *redinvert; + GtkWidget *greeninvert; + GtkWidget *blueinvert; + GtkWidget *colormode0; + GtkWidget *colormode1; +}; + + +typedef struct DFigObj { + gchar * name; /* Trailing name of file */ + gchar * filename; /* Filename itself */ + gchar * draw_name;/* Name of the drawing */ + explorer_vals_t opts; /* Options enforced when fig saved */ + GtkWidget *list_item; + GtkWidget *label_widget; + GtkWidget *pixmap_widget; + gint obj_status; +} fractalexplorerOBJ; + + +typedef struct GigObj { + gchar * name; /* Trailing name of file */ + gchar * filename; /* Filename itself */ + gchar * draw_name;/* Name of the drawing */ + gint typus; + GtkWidget *list_item; + GtkWidget *label_widget; + GtkWidget *pixmap_widget; + gint obj_status; +} gradientOBJ; + +typedef struct _fractalexplorerListOptions { + GtkWidget *query_box; + GtkWidget *name_entry; + GtkWidget *list_entry; + fractalexplorerOBJ * obj; + gint created; +} fractalexplorerListOptions; + +/* States of the object */ +#define fractalexplorer_OK 0x0 +#define fractalexplorer_MODIFIED 0x1 +#define fractalexplorer_READONLY 0x2 + +#define gradient_GRADIENTEDITOR 0x2 + +static fractalexplorerOBJ *current_obj; +static fractalexplorerOBJ *pic_obj; +static GtkWidget *delete_dialog = NULL; + + + +/********************************************************************** + Declare local functions + *********************************************************************/ + +/* Gimp interface functions */ +static void query(void); +static void run(char *name, int nparams, GParam * param, int *nreturn_vals, + GParam ** return_vals); + +/* Dialog and fractal functions */ +void explorer(GDrawable * drawable); +void explorer_render_row(const guchar * src_row, guchar * dest_row, gint row, + gint row_width, gint bytes); +void transform(short int *, short int *, short int *, double, double, double); +gint explorer_dialog(void); +void dialog_update_preview(void); + +/* Functions for dialog widgets */ +void dialog_create_value(char *title, GtkTable * table, int row, gdouble * value, + int left, int right, const char *desc, scaledata * scalevalues); +void dialog_scale_update(GtkAdjustment * adjustment, gdouble * value); +void dialog_create_int_value(char *title, GtkTable * table, int row, gdouble * value, + int left, int right, const char *desc, scaledata * scalevalues); +void dialog_scale_int_update(GtkAdjustment * adjustment, gdouble * value); +void dialog_entry_update(GtkWidget * widget, gdouble * value); +void dialog_close_callback(GtkWidget * widget, gpointer data); +void dialog_ok_callback(GtkWidget * widget, gpointer data); +void dialog_cancel_callback(GtkWidget * widget, gpointer data); +void dialog_step_out_callback(GtkWidget * widget, gpointer data); +void dialog_step_in_callback(GtkWidget * widget, gpointer data); +void dialog_undo_zoom_callback(GtkWidget * widget, gpointer data); +void dialog_redo_zoom_callback(GtkWidget * widget, gpointer data); +void dialog_redraw_callback(GtkWidget * widget, gpointer data); +void dialog_reset_callback(GtkWidget * widget, gpointer data); +GtkWidget *explorer_logo_dialog(); +GtkWidget *explorer_load_dialog(); +void explorer_toggle_update(GtkWidget * widget, gpointer data); +void set_tooltip(GtkTooltips * tooltips, GtkWidget * widget, const char *desc); +void dialog_change_scale(void); +void set_cmap_preview(void); +void make_color_map(void); +void create_file_selection(); +void create_load_file_selection(); +void explorer_load(); +void load_button_press(GtkWidget * widget, gpointer data); + +/* Preview events */ +gint preview_button_press_event(GtkWidget * widget, GdkEventButton * event); +gint preview_button_release_event(GtkWidget * widget, GdkEventButton * event); +gint preview_motion_notify_event(GtkWidget * widget, GdkEventButton * event); +gint preview_leave_notify_event(GtkWidget * widget, GdkEventButton * event); +gint preview_enter_notify_event(GtkWidget * widget, GdkEventButton * event); + + + +static gint list_button_press(GtkWidget *widget,GdkEventButton *event,gpointer data); +static gint new_button_press(GtkWidget *widget,GdkEventButton *bevent,gpointer data); +static gint fractalexplorer_delete_fractalexplorer_callback(GtkWidget *widget,GdkEventButton *bevent,gpointer data); +static gint delete_button_press_ok(GtkWidget *widget,gpointer data); +static gint rescan_button_press(GtkWidget *widget,GdkEventButton *bevent,gpointer data); +static void fractalexplorer_list_ok_callback (GtkWidget *w, gpointer client_data); +static void fractalexplorer_list_cancel_callback (GtkWidget *w, gpointer client_data); +static void fractalexplorer_dialog_edit_list (GtkWidget *lwidget,fractalexplorerOBJ *obj,gint created); +static GtkWidget *new_fractalexplorer_obj(gchar * name); +static void fractalexplorer_rescan_cancel_callback (GtkWidget *w, gpointer client_data); +void clear_list_items(GtkList *list); +gint fractalexplorer_list_pos(fractalexplorerOBJ *fractalexplorer); +gint fractalexplorer_list_insert (fractalexplorerOBJ *fractalexplorer); +GtkWidget* fractalexplorer_list_item_new_with_label_and_pixmap (fractalexplorerOBJ *obj, gchar *label, GtkWidget *pix_widget); +GtkWidget* fractalexplorer_new_pixmap(GtkWidget *list, char **pixdata); +static GtkWidget *fractalexplorer_list_add(fractalexplorerOBJ *obj); +void list_button_update(fractalexplorerOBJ *obj); +fractalexplorerOBJ *fractalexplorer_new(void); +void build_list_items(GtkWidget *list); +/* +static void fractalexplorer_op_menu_popup(gint button, guint32 activate_time,fractalexplorerOBJ *obj); +*/ +void plug_in_parse_fractalexplorer_path(); +void fractalexplorer_free(fractalexplorerOBJ * fractalexplorer); +void fractalexplorer_free_everything(fractalexplorerOBJ * fractalexplorer); +void fractalexplorer_list_free_all (); +fractalexplorerOBJ *fractalexplorer_load (gchar *filename, gchar *name); +static void fractalexplorer_rescan_file_selection_ok(GtkWidget *w, GtkFileSelection *fs, gpointer data); +void fractalexplorer_list_load_all(GList *plist); +static GtkWidget *add_objects_list (); +static GtkWidget *add_gradients_list (); +static void fractalexplorer_rescan_ok_callback (GtkWidget *w, gpointer client_data); +static void fractalexplorer_rescan_add_entry_callback (GtkWidget *w, gpointer client_data); +static void fractalexplorer_rescan_list (void); +/* +static void fractalexplorer_op_menu_create(GtkWidget *window); +*/ + + +/********************************************************************** + Global variables + *********************************************************************/ + +double xmin = -2, + xmax = 1, + ymin = -1.5, + ymax = 1.5; +double xbild, + ybild, + xdiff, + ydiff; +double x_press = -1.0, + y_press = -1.0; +double x_release = -1.0, + y_release = -1.0; +float cx = -0.75; +float cy = -0.2; +GDrawable *drawable; +gint tile_width, + tile_height; +gint img_width, + img_height, + img_bpp; +gint sel_x1, + sel_y1, + sel_x2, + sel_y2; +gint sel_width, + sel_height; +gint preview_width, + preview_height; +GTile *the_tile = NULL; +double cen_x, + cen_y; +double xpos, + ypos, + oldxpos = -1, + oldypos = -1; +gint do_redsinus, + do_redcosinus, + do_rednone; +gint do_greensinus, + do_greencosinus, + do_greennone; +gint do_bluesinus, + do_bluecosinus, + do_bluenone; +gint do_redinvert, + do_greeninvert, + do_blueinvert; +gint do_colormode1 = FALSE, + do_colormode2 = FALSE; +gint do_type0 = FALSE, + do_type1 = FALSE, + do_type2 = FALSE, + do_type3 = FALSE, + do_type4 = FALSE, + do_type5 = FALSE, + do_type6 = FALSE, + do_type7 = FALSE, + do_type8 = FALSE, + do_english = TRUE, + do_french = FALSE, + do_german = FALSE; +GtkWidget *maindlg; +GtkWidget *logodlg; +GtkWidget *loaddlg; +GtkWidget *cmap_preview; +GtkWidget *cmap_preview_long; +GtkWidget *cmap_preview_long2; +GtkWidget *delete_frame_to_freeze; +GtkWidget *fractalexplorer_gtk_list; +GtkWidget *save_menu_item; +GtkWidget *fractalexplorer_op_menu; +GtkTooltips *tips; +GdkColor tips_fg, + tips_bg; +GdkCursor *MyCursor; +int ready_now = FALSE; +explorer_vals_t zooms[100]; +DialogElements *elements = NULL; +int zoomindex = 1; +int zoommax = 1; +gdouble *gg; +int line_no; +gchar *filename; +clrmap colormap; +GList *fractalexplorer_path_list = NULL; +GList *fractalexplorer_list = NULL; +GList *gradient_list = NULL; +gchar *tpath = NULL; +fractalexplorerOBJ *fractalexplorer_obj_for_menu; +static GList *rescan_list = NULL; +int lng=LNG_GERMAN; + + +GPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + query, /* query_proc */ + run, /* run_proc */ +}; + +explorer_interface_t wint = +{ + NULL, /* preview */ + NULL, /* wimage */ + FALSE /* run */ +}; /* wint */ + +static explorer_vals_t wvals = +{ + 0, -2.0, 2.0, -1.5, 1.5, 50.0, -0.75, -0.2, 0, 128.0, 128.0, 128.0, 1, 1, 0, 0, 0, 0, 1, 0, +}; /* wvals */ + +static explorer_vals_t standardvals = +{ + 0, -2.0, 2.0, -1.5, 1.5, 50.0, -0.75, -0.2, 0, 128.0, 128.0, 128.0, 1, 1, 0, 0, 0, 0, 1, 0, +}; /* standardvals */ diff --git a/plug-ins/FractalExplorer/Languages.h b/plug-ins/FractalExplorer/Languages.h new file mode 100644 index 0000000000..fc6a758bd3 --- /dev/null +++ b/plug-ins/FractalExplorer/Languages.h @@ -0,0 +1,566 @@ +static char * msg[4][104] = +{ + +/* English messages */ +{ + "OK", + "Cancel", + "Delete fractal", + "Are you sure you want to delete", + "\"%s\" from the list and from disk?", + "Delete", + "Error opening: %s", + "File '%s' Not a FractalExplorer file", + "File '%s' corrupt file - Line %d Option section incorrect", + "Internal error - list item has null object!", + "Unknown event\n", + "Edit fractal name", + "Fractal name:", + "New fractal", + "%s [copy]", + "Save", + "Save as...", + "Copy", + "Load", + "No fractalexplorer-path in gimprc:\n" + "You need to add an entry like\n" + "(fractalexplorer-path \"${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer\n" + "to your ~/.gimprc/gimprc file\n", + "fractalexplorer-path miss-configured - \nPath `%.100s' not found\n", + "Entry %.100s is not a directory\n", + "error reading fractalexplorer directory \"%s\"", + "My first fractal", + "Choose fractal by double-clicking on it", + "Rescan", + "Select directory and rescan collection", + "New", + "Create a new fractal for editing", + "Rename", + "Rename fractal in list", + "Delete currently selected fractal", + "Choose gradient by double-clicking on it", + "Add FractalExplorer path", + "Rescan for fractals", + "Add dir", + "Parameters", + "Parameters", + "Change the first (minimal) x-coordinate delimitation", + "Change the second (maximal) x-coordinate delimitation", + "Change the first (minimal) y-coordinate delimitation", + "Change the second (maximal) y-coordinate delimitation", + "Change the iteration value. The higher it is, the more details will be calculated, which will take more time.", + "Change the CX value (changes aspect of fractal, active with every fractal but Mandelbrot and Sierpinski)", + "Change the CY value (changes aspect of fractal, active with every fractal but Mandelbrot and Sierpinski)", + "Reset parameters to default values", + "Load a fractal from file", + "Save active fractal to file", + "Fractal type", + "Options", + "Reset to default values", + "Preview options", + "Realtime preview", + "If you enable this option the preview will be redrawn automatically.", + "Redraw", + "Redraw preview", + "Zoom options", + "Undo zoom", + "Undo last zoom", + "Redo zoom", + "Redo last zoom", + "Step in", + "Step out", + "Colors", + "Color density", + "Red", + "Green", + "Blue", + "Change the intensity of the red channel", + "Change the intensity of the green channel", + "Change the intensity of the blue channel", + "Color function", + "Sine", + "Cosine", + "None", + "Use sine-function for this color component", + "Use cosine-function for this color component", + "Use linear mapping instead of any trigonometrical function for this color channel", + "Inversion", + "If you enable this option higher color values will be swapped with lower ones and vice versa.", + "Color mode", + "As specified above", + "Create a color-map with the options you specified above (color density/function). The result is visible in the preview image", + "Apply active gradient to final image", + "Create a color-map using a gradient from the gradient editor.", + "Gradients", + "Fractals", + "Accept settings and start the calculation of the fractal", + "Discard any changes and close dialog box", + "About", + "Show information about the plug-in and the author", + "This will close the information box", + "Error opening '%.100s' could not save", + "Failed to write file\n", + "Save: No filename given", + "Save: Can't save to a directory", + "Load fractal parameters", + "Click here to load your file.", + "Click here to cancel load procedure.", + "Save fractal parameters", + "Click here to save your file.", + "Click here to cancel save procedure.", + "Save settings", + "This saves the currently selected language to the configuration file", +}, + + +/* Messages en français */ +{ + "Accepter", + "Annuler", + "Effacer fractal", + "Etes-vous sur de vouloir effacer le fichier", + "\"%s\" de la liste est du disque?", + "Effacer", + "Erreur lors de l'ouverture du fichier: %s", + "Le fichier '%s' ne correspond pas au format FractalExplorer!", + "Le fichier '%s' est corrompu - Ligne %d incorrecte.", + "Erreur interne - l'élément de la liste contient un objet NULL!", + "Evénement inconnu.\n", + "Changer le nom du fractal", + "Nom du fractal:", + "Nouveau fractal", + "%s [copie]", + "Enregistrer", + "Enregistrer sous...", + "Copier", + "Charger", + "Aucun répertoire FractalExplorer inscrit dans gimprc:\n" + "Vous devez aujouter une ligne telle que\n" + "(fractalexplorer-path \"${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer\n" + "dans votre fichier ~/.gimprc/gimprc\n", + "fractalexplorer-path n'est pas configuré correctement - \nDossier `%.100s' introuvable.\n", + "L'entrée %.100s n'est pas un répertoire.\n", + "Erreur lors de la lecture du répertoire \"%s\".", + "Mon premier fractal", + "Choisissez un fractal en double-cliquant sur celui-ci", + "Rafraîchir", + "Choix du répertoire et rechargement de la collection.", + "Nouveau", + "Créer nouveau fractal.", + "Renommer", + "Renommer le fractal contenu dans la liste.", + "Efface le fractal actuellement selectioné dans la liste.", + "Choisissez un dégradé de couleurs avec un double-click", + "Ajouter un dossier FractalExplorer.", + "Rechargement de nouveaux fractals.", + "Ajout de répertoires", + "Paramètres", + "Paramètres", + "Change la première delimitation de l'axe x (delimitation minimale de x).", + "Change la deuxième delimitation de l'axe x (delimitation maximale de x).", + "Change la première delimitation de l'axe y (delimitation minimale de y).", + "Change la deuxième delimitation de l'axe y (delimitation maximale de y).", + "Change la valeur d'iteration. Une valeur plus haute rend l'image plus detailée, mais utilise plus de temps de calcul.", + "Change la valeur CX (cela change l'aspect du fractal; l'option n'est pas active pour les types de fractal Mandelbrot and Sierpinski).", + "Change la valeur CY (cela change l'aspect du fractal; l'option n'est pas active pour les types de fractal Mandelbrot and Sierpinski).", + "Remets tous les paramètres à leur valeur par défaut.", + "Charge un fractal à partir d'un fichier.", + "Enregistre un fractal dans un fichier.", + "Type de fractal", + "Configuration", + "Valeurs par défaut", + "Prévisualisation", + "En temps réel", + "Si vous activez cette option, la fenêtre de prévisualisation sera automatiquement rafraîchie après chaque changement d'option.", + "Actualiser", + "Actualise et redessine la prévisualisation.", + "Options de zoom", + "Annuler zoom", + "Ceci annule le dernier zoom.", + "Refaire zoom", + "Ceci annule la dernière annulation du zoom.", + "Se rapprocher", + "S'éloigner", + "Couleurs", + "Densité des valeurs RVB d'une couleur", + "Rouge", + "Vert", + "Bleu", + "Change l'intensité du canal rouge.", + "Change l'intensité du canal vert.", + "Change l'intensité du canal bleu.", + "Fonctions appliqués aux canaux RVB", + "Sinus", + "Cosinus", + "Aucun", + "Utilise la fonction trigonométrique 'sinus' pour le calcul de cette composante de couleur.", + "Utilise la fonction trigonométrique 'cosinus' pour le calcul de cette composante de couleur.", + "Utilise une fonction linéaire au lieu d'une fonction trigonométrique pour ce canal.", + "Inversion", + "En activant cette option, vous assignez de grandes valeurs de couleurs aux couleurs ayant reçu des valeurs petites et vice versa.", + "Mode de couleur", + "Comme specifié ci-dessus", + "Crée une palette de couleur en utilisant les options que vous avez choisies ci-dessus (densité/fonction). Le résultat est visible dans l'image de prévisualisation.", + "Applique le dégradé de couleur actif", + "Crée une palette en utilisant le dégradé de couleur du 'Gradient Editor'.", + "Dégradés", + "Fractals", + "Accepte les options et démarre la calculation du fractal.", + "Rejette tout changement et ferme la boîte de dialogue.", + "Info...", + "Affiche des informations concernant l'auteur et le plug-in.", + "Ceci fermera la boîte de dialogue d'info.", + "Erreur lors de l'ouverture de '%.100s'. Sauvegarde echouée.", + "Ecriture du fichier impossible.\n", + "Enregistrement: Aucun fichier specifié.", + "Enregistrement: Impossible de sauvegarder dans un répertoire.", + "Chargement des paramètres d'un fractal", + "Cliquez ici afin de charger un fichier FractalExplorer.", + "Cliquez ici pour interrompre la procédure de chargement.", + "Enregistrement des paramètres d'un fractal", + "Cliquez ici pour charger votre fichier.", + "Cliquez ici pour imterropre la procédure d'enregistrement.", + "Enregistrer langue", + "Ceci enregistre la langue actuelle dans le fichier de configuration.", +}, + +/* Deutsche Mitteilungen */ +{ + "Weiter", + "Abbrechen", + "Fraktal löschen", + "Sind sie sicher, dass sie die Datei", + "\"%s\" aus der Liste und von der Festplatte entfernen möchten?", + "Löschen", + "Fehler beim Öffnen der Datei: %s", + "Die Datei '%s' scheint nicht im FractalExplorer-Format zu sein!", + "Die Datei '%s' ist beschädigt - Zeile %d inkorrekt.", + "Interner Fehler - das Listenelement besitzt ein NULL Objekt!", + "Unbekanntes Ereignis.\n", + "Ändere Fraktalnamen", + "Fraktal-Name:", + "Neues Fraktal", + "%s [Kopie]", + "Speichern", + "Speichern als...", + "Kopie", + "Laden", + "Kein fractalexplorer-path in gimprc:\n" + "Sie müssen einen Eintrag wie der folgende in ihre ~/.gimprc/gimprc Datei einfügen:\n" + "(fractalexplorer-path \"${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer\n", + "fractalexplorer-path falsch konfiguriert - \nPfad `%.100s' nicht gefunden\n", + "Eintrag %.100s ist kein Verzeichnis.\n", + "Fehler beim Lesen des FractalExplorer-Verzeichnisses \"%s\".", + "Mein erstes Fraktal", + "Wählen Sie ein Fraktal durch Doppelklick aus", + "Aktualisieren", + "Wahl eines Verzeichnisses und Wiedereinlese der Dateisammlung.", + "Neu", + "Erstellt ein neues Fraktal.", + "Umbenennen", + "Benennt das Fraktal in der Liste um.", + "Löscht das gerade gewählte Fraktal der Liste.", + "Wählen Sie einen Farbverlauf durch Doppelklick aus", + "Füge FractalExplorer-Pfad hinzu", + "Nach neuen Fraktalen suchen", + "Neues Verzeichis hinzufügen.", + "Fraktal-Optionen", + "Parameter", + "Ändert die erste (minimale) Begrenzung der x-Koordinate.", + "Ändert die zweite (maximale) Begrenzung der x-Koordinate.", + "Ändert die erste (minimale) Begrenzung der y-Koordinate.", + "Ändert die zweite (maximale) Begrenzung der y-Koordinate.", + "Ändert die Iterations-Variable. Je höher sie ist, um so genauer und detailierter wird das Bild sein. Eine grössere Berechenzeit ist allerdings in Kauf zu nehmen.", + "Ändert den CX-Wert (Dies wirkt sich auf alle Fraktale aus, ausser Mandelbrot und Sierpinski).", + "Ändert den CY-Wert (Dies wirkt sich auf alle Fraktale aus, ausser Mandelbrot und Sierpinski).", + "Setze Parameter auf die Standardwerte zurueck.", + "Lade ein Fraktal aus einer Datei", + "Speichere das aktive Fraktal in eine Datei", + "Fraktal-Typ", + "Diverse Optionen", + "Zurücksetzen", + "Vorschau-Optionen", + "Echtzeit-Vorschau", + "Falls Sie diese Option aktivieren, wird das Vorschaufenster stets automatisch aktualisiert.", + "Neu zeichnen", + "Zeichnet die Vorschau neu", + "Zoom-Optionen", + "Rueckgängig", + "Macht den letzten Zoom-Vorgang wieder rückgängig.", + "Wiederherstellen", + "Stellt den letzten Zoom-Vorgang wieder her.", + "Hinein", + "Hinaus", + "Farb-Optionen", + "Farbintensität", + "Rot", + "Gruen", + "Blau", + "Ändert die Intensität des roten Kanals.", + "Ändert die Intensität des gruenen Kanals.", + "Ändert die Intensität des blauen Kanals.", + "Farb-Funktion", + "Sinus", + "Cosinus", + "Keine", + "Verwende Sinus-Funktion für diese Farbkomponente.", + "Verwende Cosinus-Funktion für diese Farbkomponente.", + "Verwende lineare Farbabstufung statt einer trigonometrischen Funktion.", + "Inversion", + "Falls Sie diese Option aktivieren, werden tiefere Farbwerte durch höhere ausgetauscht und umgekehrt.", + "Farb-Modus", + "Wie oben stehend angegeben", + "Berechne Farbpalette mit den oben angegebenen Optionen (Farb-Intensität/-Funktion). Das Resultat ist in der Vorschau sichtbar.", + "Wende aktiven Farbverlauf an", + "Berechne Farbpalette mit den Angaben eines Verlaufes aus dem Gradient-Editor.", + "Farbverläufe", + "Fraktale", + "Akzeptiere Einstellungen und starte die Berechnung des Fraktals.", + "Verwerfe jegliche Änderungen und schliesse das Fenster.", + "Über...", + "Zeige Informationen über den Autor und das Plug-In.", + "Info-Box schliessen", + "Fehler beim Öffnen von '%.100s'. Konnte nicht speichern", + "Speichern der Datei fehlgeschlagen\n", + "Speichern: Keine Datei angegeben", + "Speichern: Kann nicht in ein Verzeichnis speichern", + "Lade Parameter eines Fraktals", + "Klicken Sie hier, um das Fraktal zu laden.", + "Klicken Sie hier, um den Ladevorgang abzubrechen.", + "Speichere Fraktalparameter", + "Klicken Sie hier, um das Fraktal in eine Datei zu speichern.", + "Klicken Sie hier, um den Speicherungsvorgang abzubrechen.", + "Sprache abspeichern", + "Klicken Sie hier, um die gewaehlte Sprache als Standard zu definieren und in die Konfigurationsdatei abzuspeichern.", +}, + +/* Schwedische Mitteilungen + ======================== + Hier koenntest Du die schwedischen Texte einfuegen, d.h. die deutschen ueberschreiben. +*/ + +{ + "Weiter", + "Abbrechen", + "Fraktal löschen", + "Sind sie sicher, dass sie die Datei", + "\"%s\" aus der Liste und von der Festplatte entfernen möchten?", + "Löschen", + "Fehler beim Öffnen der Datei: %s", + "Die Datei '%s' scheint nicht im FractalExplorer-Format zu sein!", + "Die Datei '%s' ist beschädigt - Zeile %d inkorrekt.", + "Interner Fehler - das Listenelement besitzt ein NULL Objekt!", + "Unbekanntes Ereignis.\n", + "Ändere Fraktalnamen", + "Fraktal-Name:", + "Neues Fraktal", + "%s [Kopie]", + "Speichern", + "Speichern als...", + "Kopie", + "Laden", + "Kein fractalexplorer-path in gimprc:\n" + "Sie müssen einen Eintrag wie der folgende in ihre ~/.gimprc/gimprc Datei einfügen:\n" + "(fractalexplorer-path \"${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer\n", + "fractalexplorer-path falsch konfiguriert - \nPfad `%.100s' nicht gefunden\n", + "Eintrag %.100s ist kein Verzeichnis.\n", + "Fehler beim Lesen des FractalExplorer-Verzeichnisses \"%s\".", + "Mein erstes Fraktal", + "Wählen Sie ein Fraktal durch Doppelklick aus", + "Aktualisieren", + "Wahl eines Verzeichnisses und Wiedereinlese der Dateisammlung.", + "Neu", + "Erstellt ein neues Fraktal.", + "Umbenennen", + "Benennt das Fraktal in der Liste um.", + "Löscht das gerade gewählte Fraktal der Liste.", + "Wählen Sie einen Farbverlauf durch Doppelklick aus", + "Füge FractalExplorer-Pfad hinzu", + "Nach neuen Fraktalen suchen", + "Neues Verzeichis hinzufügen.", + "Fraktal-Optionen", + "Parameter", + "Ändert die erste (minimale) Begrenzung der x-Koordinate.", + "Ändert die zweite (maximale) Begrenzung der x-Koordinate.", + "Ändert die erste (minimale) Begrenzung der y-Koordinate.", + "Ändert die zweite (maximale) Begrenzung der y-Koordinate.", + "Ändert die Iterations-Variable. Je höher sie ist, um so genauer und detailierter wird das Bild sein. Eine grössere Berechenzeit ist allerdings in Kauf zu nehmen.", + "Ändert den CX-Wert (Dies wirkt sich auf alle Fraktale aus, ausser Mandelbrot und Sierpinski).", + "Ändert den CY-Wert (Dies wirkt sich auf alle Fraktale aus, ausser Mandelbrot und Sierpinski).", + "Setze Parameter auf die Standardwerte zurueck.", + "Lade ein Fraktal aus einer Datei", + "Speichere das aktive Fraktal in eine Datei", + "Fraktal-Typ", + "Diverse Optionen", + "Zurücksetzen", + "Vorschau-Optionen", + "Echtzeit-Vorschau", + "Falls Sie diese Option aktivieren, wird das Vorschaufenster stets automatisch aktualisiert.", + "Neu zeichnen", + "Zeichnet die Vorschau neu", + "Zoom-Optionen", + "Rueckgängig", + "Macht den letzten Zoom-Vorgang wieder rückgängig.", + "Wiederherstellen", + "Stellt den letzten Zoom-Vorgang wieder her.", + "Hinein", + "Hinaus", + "Farb-Optionen", + "Farbintensität", + "Rot", + "Gruen", + "Blau", + "Ändert die Intensität des roten Kanals.", + "Ändert die Intensität des gruenen Kanals.", + "Ändert die Intensität des blauen Kanals.", + "Farb-Funktion", + "Sinus", + "Cosinus", + "Keine", + "Verwende Sinus-Funktion für diese Farbkomponente.", + "Verwende Cosinus-Funktion für diese Farbkomponente.", + "Verwende lineare Farbabstufung statt einer trigonometrischen Funktion.", + "Inversion", + "Falls Sie diese Option aktivieren, werden tiefere Farbwerte durch höhere ausgetauscht und umgekehrt.", + "Farb-Modus", + "Wie oben stehend angegeben", + "Berechne Farbpalette mit den oben angegebenen Optionen (Farb-Intensität/-Funktion). Das Resultat ist in der Vorschau sichtbar.", + "Wende aktiven Farbverlauf an", + "Berechne Farbpalette mit den Angaben eines Verlaufes aus dem Gradient-Editor.", + "Farbverläufe", + "Fraktale", + "Akzeptiere Einstellungen und starte die Berechnung des Fraktals.", + "Verwerfe jegliche Änderungen und schliesse das Fenster.", + "Über...", + "Zeige Informationen über den Autor und das Plug-In.", + "Info-Box schliessen", + "Fehler beim Öffnen von '%.100s'. Konnte nicht speichern", + "Speichern der Datei fehlgeschlagen\n", + "Speichern: Keine Datei angegeben", + "Speichern: Kann nicht in ein Verzeichnis speichern", + "Lade Parameter eines Fraktals", + "Klicken Sie hier, um das Fraktal zu laden.", + "Klicken Sie hier, um den Ladevorgang abzubrechen.", + "Speichere Fraktalparameter", + "Klicken Sie hier, um das Fraktal in eine Datei zu speichern.", + "Klicken Sie hier, um den Speicherungsvorgang abzubrechen.", + "Sprache abspeichern", + "Klicken Sie hier, um die gewaehlte Sprache als Standard zu definieren und in die Konfigurationsdatei abzuspeichern.", +}, + +}; + +enum { + MSG_OK, + MSG_CANCEL, + MSG_DELFRAC, + MSG_DELSURE, + MSG_DELSURE2, + MSG_DEL, + MSG_OPENERROR, + MSG_WRONGFILETYPE, + MSG_CORRUPTFILE, + MSG_NULLLIST, + MSG_UNKNOWN_EVENT, + MSG_EDIT_FRACNAME, + MSG_FRACNAME, + MSG_NEWFRAC, + MSG_COPYNAME, + MSG_SAVE, + MSG_SAVEAS, + MSG_COPY, + MSG_LOAD, + MSG_MISSING_GIMPRC, + MSG_WRONGPATH, + MSG_NOTDIR, + MSG_DIRREADERROR, + MSG_FIRSTFRACTAL, + MSG_CHOOSE_FRACTAL, + MSG_RESCAN, + MSG_RESCAN_COMMENT, + MSG_NEW, + MSG_NEW_COMMENT, + MSG_RENAME, + MSG_RENAME_COMMENT, + MSG_DELETE_COMMENT, + MSG_CHOOSE_GRADIENT, + MSG_ADDPATH, + MSG_RESCANTITLE1, + MSG_ADDDIR, + MSG_FRACTALOPTIONS, + MSG_PARAMETERS, + MSG_XMIN, + MSG_XMAX, + MSG_YMIN, + MSG_YMAX, + MSG_ITER, + MSG_CX, + MSG_CY, + MSG_RESET_PARAM_COMMENT, + MSG_LOADCOMMENT, + MSG_SAVECOMMENT, + MSG_FRACTALTYPE, + MSG_GENERALOPTIONS, + MSG_RESET, + MSG_PREVIEW, + MSG_REALTIMEPREVIEW, + MSG_REDRAWCOMMENT, + MSG_REDRAW, + MSG_REDRAWPREVIEW, + MSG_ZOOMOPTS, + MSG_UNDOZOOM, + MSG_UNDOCOMMENT, + MSG_REDOZOOM, + MSG_REDOCOMMENT, + MSG_STEPIN, + MSG_STEPOUT, + MSG_COLOROPTS, + MSG_COLORDENSITY, + MSG_RED, + MSG_GREEN, + MSG_BLUE, + MSG_REDINTENSITY, + MSG_GREENINTENSITY, + MSG_BLUEINTENSITY, + MSG_COLORFUNCTION, + MSG_SINE, + MSG_COSINE, + MSG_NONE, + MSG_SINECOMMENT, + MSG_COSINECOMMENT, + MSG_NONECOMMENT, + MSG_INVERSION, + MSG_INVERSIONCOMMENT, + MSG_COLORMODE, + MSG_ASSPECIFIED, + MSG_ASSPECIFIEDCOMMENT, + MSG_APPLYGRADIENT, + MSG_APPLYGRADIENTCOMMENT, + MSG_GRADIENTPRESETS, + MSG_FRACTALPRESETS, + MSG_STARTCALC, + MSG_MAINDLGCANCEL, + MSG_ABOUT, + MSG_ABOUTCOMMENT, + MSG_ABOUTBOXOKCOMMENT, + MSG_SAVEERROR, + MSG_WRITEFAILURE, + MSG_NOFILENAME, + MSG_NOSAVETODIR, + MSG_LOADWINTITLE, + MSG_LOADBUTTONCOMMENT, + MSG_CANCELLOAD, + MSG_SAVEWINTITLE, + MSG_SAVEBUTTONCOMMENT, + MSG_CANCELSAVE, + MSG_SAVELANGUAGE, + MSG_SAVELANGUAGE_COMMENT +}; + +enum { + LNG_ENGLISH, + LNG_FRENCH, + LNG_GERMAN, + LNG_ITALIAN, + LNG_SPANISH +}; diff --git a/plug-ins/FractalExplorer/Makefile.am b/plug-ins/FractalExplorer/Makefile.am new file mode 100644 index 0000000000..1504cebb0f --- /dev/null +++ b/plug-ins/FractalExplorer/Makefile.am @@ -0,0 +1,46 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = fractalexplorer-examples + +pluginlibdir = $(gimpplugindir)/plug-ins + +pluginlib_PROGRAMS = FractalExplorer + +FractalExplorer_SOURCES = \ + Callbacks.h \ + Dialogs.h \ + Events.h \ + FractalExplorer.c \ + FractalExplorer.h \ + Languages.h \ + logo.h \ + pix_data.h + +INCLUDES = \ + -I$(top_srcdir) \ + $(GTK_CFLAGS) \ + -I$(includedir) + +LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(GTK_LIBS) + +DEPS = \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la + +FractalExplorer_DEPENDENCIES = $(DEPS) + +.PHONY: files + +files: + @files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \ + echo $$p; \ + done + @for subdir in $(SUBDIRS); do \ + files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \ + for file in $$files; do \ + echo $$subdir/$$file; \ + done; \ + done diff --git a/plug-ins/FractalExplorer/README b/plug-ins/FractalExplorer/README new file mode 100644 index 0000000000..351970ec62 --- /dev/null +++ b/plug-ins/FractalExplorer/README @@ -0,0 +1,91 @@ +------------------------------------------- + GIMP-Plug-In +------------------------------------------- + Written by Daniel Cotting + Quellenstrasse 10 + CH-8005 Zuerich (Switzerland) + + cotting@multimania.com + www.multimania.com/cotting +------------------------------------------- + Some code is taken out of other plug-ins + written by other authors. +------------------------------------------- + + Ported to GIMP 1.1 by + Michael Natterer + +------------------------------------------- + INSTALLATION +------------------------------------------- + To install it, you have to edit the + Makefile (change install-path). + Afterwards run make. This will compile + and install the plug-in in the right + directory. Once the new code is installed, + you can run the GIMP and enjoy the new + functions and effects it provides. + + Note that this plug-in has some sample + files which must be installed in one of + the following directories: + + ~/.gimp/fractalexplorer + /usr/share/gimp/fractalexplorer + + You can find the sample files in the + subdirectory fractalexplorer-examples + of this distribution. + + You will have to add the following lines + to your gimprc file (usually + /usr/share/gimp/gimprc): + + # fractalexplorer directory + (fractalexplorer-path "${gimp_data_dir}/fractalexplorer:${gimp_dir}/fractalexplorer") + +------------------------------------------- + + +------------------------------------------- + REDUCE CODE SIZE +------------------------------------------- + If you find that the plug-in is too big, + you can compress the executables with the + gzexe program (if it is avaiable on your + system). To do so, change to the plug-in + directory of the GIMP... + + cd /usr/lib/gimp/VERSION/plug-ins + + ...and execute the command... + + gzexe PLUGIN_NAME + + ...and remember to remove the uncompres- + sed binary, which has been renamed to + PLUGIN_NAME~, by running the command: + + rm PLUGIN_NAME~ + + This will result in a code size of about + 50 kB, which isn't too much IMHO. +------------------------------------------ + + +------------------------------------------ + FEEDBACK +------------------------------------------ + I'm interested in any feedback, comments, + bug-reports, suggestions etc. If you + have anything you would like to tell + me, you can write to cotting@multimania.com. + Also have a look at the GIMP-section of + my homepage at www.multimania.com/cotting. +------------------------------------------ + + Thank you and happy GIMPing! + Daniel Cotting + +------------------------------------------ + \ No newline at end of file diff --git a/plug-ins/FractalExplorer/examples/.cvsignore b/plug-ins/FractalExplorer/examples/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/plug-ins/FractalExplorer/examples/Asteroid_Field b/plug-ins/FractalExplorer/examples/Asteroid_Field new file mode 100644 index 0000000000..887acc362d --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Asteroid_Field @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 5 +xmin: -0.664136886596680 +xmax: -0.663678705692291 +ymin: -0.378479450941086 +ymax: -0.378030359745026 +iter: 214.723999023437500 +cx: 0.184000000357628 +cy: -0.200000002980232 +redstretch: 89.130996704101562 +greenstretch: 70.365997314453125 +bluestretch: 58.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Bar_Code_Label b/plug-ins/FractalExplorer/examples/Bar_Code_Label new file mode 100644 index 0000000000..9a967bfc81 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Bar_Code_Label @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.443357914686203 +xmax: -0.443357914686203 +ymin: 0.085399866104126 +ymax: 0.085484646260738 +iter: 50.000000000000000 +cx: -0.847000002861023 +cy: -0.184000000357628 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Beauty_of_Nature b/plug-ins/FractalExplorer/examples/Beauty_of_Nature new file mode 100644 index 0000000000..2b56507209 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Beauty_of_Nature @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.125070333480835 +xmax: -0.120749041438103 +ymin: -0.537724196910858 +ymax: -0.532733201980591 +iter: 49.080001831054688 +cx: 0.453999996185303 +cy: 0.000000000000000 +redstretch: 123.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 78.000000000000000 +redmode: 1 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Blue_Curtain b/plug-ins/FractalExplorer/examples/Blue_Curtain new file mode 100644 index 0000000000..272fe7ac58 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Blue_Curtain @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: 0.257157027721405 +xmax: 0.257280886173248 +ymin: 0.153874531388283 +ymax: 0.154003381729126 +iter: 49.080001831054688 +cx: -0.750000000000000 +cy: -0.356000006198883 +redstretch: 123.978996276855469 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Car_Track b/plug-ins/FractalExplorer/examples/Car_Track new file mode 100644 index 0000000000..5d37c6c6e4 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Car_Track @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.104991987347603 +xmax: -0.104991905391216 +ymin: 0.250050097703934 +ymax: 0.250050216913223 +iter: 202.453994750976562 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Energetic_Diamond b/plug-ins/FractalExplorer/examples/Energetic_Diamond new file mode 100644 index 0000000000..f8e79ca83b --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Energetic_Diamond @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -1.255496978759766 +xmax: -1.249950170516968 +ymin: -0.347052335739136 +ymax: -0.338468551635742 +iter: 50.000000000000000 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 2 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Explosive b/plug-ins/FractalExplorer/examples/Explosive new file mode 100644 index 0000000000..57327691a8 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Explosive @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: 0.353848785161972 +xmax: 0.356627285480499 +ymin: 0.458385974168777 +ymax: 0.460633248090744 +iter: 147.238998413085938 +cx: 0.000000000000000 +cy: 0.000000000000000 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 1 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Flower b/plug-ins/FractalExplorer/examples/Flower new file mode 100644 index 0000000000..f1712a9b04 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Flower @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.125281319022179 +xmax: -0.116631627082825 +ymin: 0.375891804695129 +ymax: 0.384632647037506 +iter: 67.485000610351562 +cx: 0.405000001192093 +cy: -0.200000002980232 +redstretch: 124.000000000000000 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 0 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Fragments b/plug-ins/FractalExplorer/examples/Fragments new file mode 100644 index 0000000000..37fa127301 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Fragments @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 2 +xmin: -0.508517742156982 +xmax: -0.475813776254654 +ymin: -0.025438375771046 +ymax: 0.025984741747379 +iter: 177.914001464843750 +cx: -1.018000006675720 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 1 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Hemp b/plug-ins/FractalExplorer/examples/Hemp new file mode 100644 index 0000000000..6d941acfa5 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Hemp @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.968750000000000 +xmax: 0.437500000000000 +ymin: -0.703125000000000 +ymax: 0.843750000000000 +iter: 50.000000000000000 +cx: -0.012000000104308 +cy: 0.000000000000000 +redstretch: 87.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 0.000000000000000 +redmode: 0 +greenmode: 2 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/High_Voltage b/plug-ins/FractalExplorer/examples/High_Voltage new file mode 100644 index 0000000000..788cfa8010 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/High_Voltage @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 1 +xmin: -0.476808547973633 +xmax: -0.223514556884766 +ymin: -0.017941474914551 +ymax: 0.114898681640625 +iter: 50.000000000000000 +cx: -1.337000012397766 +cy: 0.086000002920628 +redstretch: 127.330001831054688 +greenstretch: 90.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 2 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Hoops b/plug-ins/FractalExplorer/examples/Hoops new file mode 100644 index 0000000000..83f09aeb7f --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Hoops @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.345402956008911 +xmax: -0.252956151962280 +ymin: -0.274888515472412 +ymax: -0.204696178436279 +iter: 30.674999237060547 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 67.000000000000000 +bluestretch: 98.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Ice_Crystal b/plug-ins/FractalExplorer/examples/Ice_Crystal new file mode 100644 index 0000000000..db6a396a55 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Ice_Crystal @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 1 +xmin: 0.068130433559418 +xmax: 0.116958513855934 +ymin: 0.512302279472351 +ymax: 0.534968316555023 +iter: 202.453994750976562 +cx: 0.356000006198883 +cy: 0.428999990224838 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Leaves b/plug-ins/FractalExplorer/examples/Leaves new file mode 100644 index 0000000000..43706e8969 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Leaves @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.350769042968750 +xmax: -0.080402374267578 +ymin: -0.264384269714355 +ymax: -0.041095733642578 +iter: 50.000000000000000 +cx: -0.184000000357628 +cy: 0.000000000000000 +redstretch: 29.000000000000000 +greenstretch: 80.000000000000000 +bluestretch: 7.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Lightning b/plug-ins/FractalExplorer/examples/Lightning new file mode 100644 index 0000000000..bb23dc5453 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Lightning @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -1.285429239273071 +xmax: -1.283814907073975 +ymin: 0.428520709276199 +ymax: 0.432528734207153 +iter: 50.000000000000000 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 89.130996704101562 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Makefile.am b/plug-ins/FractalExplorer/examples/Makefile.am new file mode 100644 index 0000000000..cf55974a9c --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Makefile.am @@ -0,0 +1,45 @@ +## Process this file with automake to produce Makefile.in + +fractalexplorerdatadir = $(gimpdatadir)/fractalexplorer + +fractalexplorerdata_DATA = \ + Asteroid_Field \ + Bar_Code_Label \ + Beauty_of_Nature \ + Blue_Curtain \ + Car_Track \ + Energetic_Diamond \ + Explosive \ + Flower \ + Fragments \ + Hemp \ + High_Voltage \ + Hoops \ + Ice_Crystal \ + Leaves \ + Lightning \ + Mandelbrot \ + Marble \ + Marble2 \ + Medusa \ + Nautilus \ + Nebula \ + Plant \ + Rose \ + Saturn \ + Snow_Crystal \ + Soma \ + Spark \ + Suns \ + Tentacles \ + The_Green_Place \ + Wave \ + Wood \ + Zooming_Circle + +EXTRA_DIST = $(fractalexplorerdata_DATA) + +files: + @files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \ + echo $$p; \ + done diff --git a/plug-ins/FractalExplorer/examples/Mandelbrot b/plug-ins/FractalExplorer/examples/Mandelbrot new file mode 100644 index 0000000000..5a604e51d6 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Mandelbrot @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -0.078803382813931 +xmax: -0.077717751264572 +ymin: -0.880311131477356 +ymax: -0.879459798336029 +iter: 503.066986083984375 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 120.627998352050781 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 2 +bluemode: 0 +redinvert: 1 +greeninvert: 0 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Marble b/plug-ins/FractalExplorer/examples/Marble new file mode 100644 index 0000000000..ea3f71a2a2 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Marble @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.235851287841797 +xmax: -0.060367584228516 +ymin: 0.091303825378418 +ymax: 0.220178604125977 +iter: 55.215000152587891 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 127.330001831054688 +redmode: 1 +greenmode: 2 +bluemode: 2 +redinvert: 0 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Marble2 b/plug-ins/FractalExplorer/examples/Marble2 new file mode 100644 index 0000000000..a0f26cb354 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Marble2 @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.146484375000000 +xmax: 0.064453125000000 +ymin: 0.154907226562500 +ymax: 0.358154296875000 +iter: 50.000000000000000 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Medusa b/plug-ins/FractalExplorer/examples/Medusa new file mode 100644 index 0000000000..5b74743545 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Medusa @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -1.408687233924866 +xmax: -1.408686757087708 +ymin: -0.135643482208252 +ymax: -0.135642752051353 +iter: 104.293998718261719 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 0 +bluemode: 1 +redinvert: 1 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Nautilus b/plug-ins/FractalExplorer/examples/Nautilus new file mode 100644 index 0000000000..0c7da432df --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Nautilus @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.078369140625000 +xmax: 0.158203125000000 +ymin: -0.485778808593750 +ymax: -0.197387695312500 +iter: 134.968994140625000 +cx: 0.109999999403954 +cy: 0.037000000476837 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Nebula b/plug-ins/FractalExplorer/examples/Nebula new file mode 100644 index 0000000000..1246289a17 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Nebula @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.935546875000000 +xmax: 0.226562500000000 +ymin: 0.034790039062500 +ymax: 0.995361328125000 +iter: 67.485000610351562 +cx: 0.428999990224838 +cy: 0.232999995350838 +redstretch: 128.000000000000000 +greenstretch: 120.627998352050781 +bluestretch: 93.000000000000000 +redmode: 2 +greenmode: 2 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Plant b/plug-ins/FractalExplorer/examples/Plant new file mode 100644 index 0000000000..29731eca3d --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Plant @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.251464843750000 +xmax: -0.097656250000000 +ymin: -0.626953125000000 +ymax: -0.503356933593750 +iter: 55.215000152587891 +cx: 0.503000020980835 +cy: -0.012000000104308 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 1 +bluemode: 0 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Rose b/plug-ins/FractalExplorer/examples/Rose new file mode 100644 index 0000000000..8c88d8e321 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Rose @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 7 +xmin: 0.011789147742093 +xmax: 0.012022980488837 +ymin: 0.040065050125122 +ymax: 0.040298193693161 +iter: 92.025001525878906 +cx: -1.092000007629395 +cy: 0.232999995350838 +redstretch: 124.000000000000000 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 1 +greenmode: 0 +bluemode: 0 +redinvert: 1 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Saturn b/plug-ins/FractalExplorer/examples/Saturn new file mode 100644 index 0000000000..ec0542be09 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Saturn @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.720550119876862 +xmax: -0.736553728580475 +ymin: 0.128735020756721 +ymax: 0.068184189498425 +iter: 49.080001831054688 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 119.958000183105469 +greenstretch: 85.779998779296875 +bluestretch: 6.031000137329102 +redmode: 0 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Snow_Crystal b/plug-ins/FractalExplorer/examples/Snow_Crystal new file mode 100644 index 0000000000..02f2928d05 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Snow_Crystal @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -0.562806546688080 +xmax: -0.561547160148621 +ymin: -0.643333077430725 +ymax: -0.642277657985687 +iter: 122.698997497558594 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Soma b/plug-ins/FractalExplorer/examples/Soma new file mode 100644 index 0000000000..9d9b44666f --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Soma @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.038584709167480 +xmax: 0.094075202941895 +ymin: -0.689266920089722 +ymax: -0.584711074829102 +iter: 98.160003662109375 +cx: 0.405000001192093 +cy: 0.037000000476837 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 2 +redinvert: 0 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Spark b/plug-ins/FractalExplorer/examples/Spark new file mode 100644 index 0000000000..f4b2ec6993 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Spark @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 7 +xmin: -0.014160156250000 +xmax: 1.014160156250000 +ymin: -0.261108398437500 +ymax: 0.252685546875000 +iter: 42.944999694824219 +cx: -1.386999964714050 +cy: -0.257999986410141 +redstretch: 124.000000000000000 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 0 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 1 +colormode: 1 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Suns b/plug-ins/FractalExplorer/examples/Suns new file mode 100644 index 0000000000..683a147c05 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Suns @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 1 +xmin: -0.573436737060547 +xmax: -0.399868011474609 +ymin: -0.177640914916992 +ymax: -0.024647712707520 +iter: 607.361999511718750 +cx: -0.723999977111816 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 0 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Tentacles b/plug-ins/FractalExplorer/examples/Tentacles new file mode 100644 index 0000000000..19402f4dc3 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Tentacles @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.430790066719055 +xmax: -0.421469658613205 +ymin: 0.017559077590704 +ymax: 0.025114785879850 +iter: 67.485000610351562 +cx: -0.086000002920628 +cy: -0.012000000104308 +redstretch: 128.000000000000000 +greenstretch: 37.000000000000000 +bluestretch: 93.000000000000000 +redmode: 2 +greenmode: 2 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/The_Green_Place b/plug-ins/FractalExplorer/examples/The_Green_Place new file mode 100644 index 0000000000..8504364f4b --- /dev/null +++ b/plug-ins/FractalExplorer/examples/The_Green_Place @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 2 +xmin: 0.064453125000000 +xmax: 0.950683593750000 +ymin: -0.389648437500000 +ymax: 0.476440429687500 +iter: 50.000000000000000 +cx: -1.067000031471252 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 110.000000000000000 +bluestretch: 2.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 1 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Wave b/plug-ins/FractalExplorer/examples/Wave new file mode 100644 index 0000000000..e9deae072d --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Wave @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 2 +xmin: -0.937500000000000 +xmax: 1.125000000000000 +ymin: -0.609375000000000 +ymax: 0.609375000000000 +iter: 50.000000000000000 +cx: -1.042999982833862 +cy: -0.037000000476837 +redstretch: 128.000000000000000 +greenstretch: 22.000000000000000 +bluestretch: 101.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Wood b/plug-ins/FractalExplorer/examples/Wood new file mode 100644 index 0000000000..ffdd12078f --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Wood @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -1.287102937698364 +xmax: -1.287102580070496 +ymin: 0.099825143814087 +ymax: 0.099862203001976 +iter: 50.000000000000000 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 109.905998229980469 +bluestretch: 2.009999990463257 +redmode: 1 +greenmode: 0 +bluemode: 0 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/examples/Zooming_Circle b/plug-ins/FractalExplorer/examples/Zooming_Circle new file mode 100644 index 0000000000..75a704daf3 --- /dev/null +++ b/plug-ins/FractalExplorer/examples/Zooming_Circle @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 3 +xmin: 0.187500000000000 +xmax: 0.984375000000000 +ymin: 0.843750000000000 +ymax: 1.734375000000000 +iter: 50.000000000000000 +cx: 0.773000001907349 +cy: -0.723999977111816 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 0 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/.cvsignore b/plug-ins/FractalExplorer/fractalexplorer-examples/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Asteroid_Field b/plug-ins/FractalExplorer/fractalexplorer-examples/Asteroid_Field new file mode 100644 index 0000000000..887acc362d --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Asteroid_Field @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 5 +xmin: -0.664136886596680 +xmax: -0.663678705692291 +ymin: -0.378479450941086 +ymax: -0.378030359745026 +iter: 214.723999023437500 +cx: 0.184000000357628 +cy: -0.200000002980232 +redstretch: 89.130996704101562 +greenstretch: 70.365997314453125 +bluestretch: 58.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Bar_Code_Label b/plug-ins/FractalExplorer/fractalexplorer-examples/Bar_Code_Label new file mode 100644 index 0000000000..9a967bfc81 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Bar_Code_Label @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.443357914686203 +xmax: -0.443357914686203 +ymin: 0.085399866104126 +ymax: 0.085484646260738 +iter: 50.000000000000000 +cx: -0.847000002861023 +cy: -0.184000000357628 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Beauty_of_Nature b/plug-ins/FractalExplorer/fractalexplorer-examples/Beauty_of_Nature new file mode 100644 index 0000000000..2b56507209 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Beauty_of_Nature @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.125070333480835 +xmax: -0.120749041438103 +ymin: -0.537724196910858 +ymax: -0.532733201980591 +iter: 49.080001831054688 +cx: 0.453999996185303 +cy: 0.000000000000000 +redstretch: 123.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 78.000000000000000 +redmode: 1 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Blue_Curtain b/plug-ins/FractalExplorer/fractalexplorer-examples/Blue_Curtain new file mode 100644 index 0000000000..272fe7ac58 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Blue_Curtain @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: 0.257157027721405 +xmax: 0.257280886173248 +ymin: 0.153874531388283 +ymax: 0.154003381729126 +iter: 49.080001831054688 +cx: -0.750000000000000 +cy: -0.356000006198883 +redstretch: 123.978996276855469 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Car_Track b/plug-ins/FractalExplorer/fractalexplorer-examples/Car_Track new file mode 100644 index 0000000000..5d37c6c6e4 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Car_Track @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.104991987347603 +xmax: -0.104991905391216 +ymin: 0.250050097703934 +ymax: 0.250050216913223 +iter: 202.453994750976562 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Energetic_Diamond b/plug-ins/FractalExplorer/fractalexplorer-examples/Energetic_Diamond new file mode 100644 index 0000000000..f8e79ca83b --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Energetic_Diamond @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -1.255496978759766 +xmax: -1.249950170516968 +ymin: -0.347052335739136 +ymax: -0.338468551635742 +iter: 50.000000000000000 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 2 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Explosive b/plug-ins/FractalExplorer/fractalexplorer-examples/Explosive new file mode 100644 index 0000000000..57327691a8 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Explosive @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: 0.353848785161972 +xmax: 0.356627285480499 +ymin: 0.458385974168777 +ymax: 0.460633248090744 +iter: 147.238998413085938 +cx: 0.000000000000000 +cy: 0.000000000000000 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 1 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Flower b/plug-ins/FractalExplorer/fractalexplorer-examples/Flower new file mode 100644 index 0000000000..f1712a9b04 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Flower @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.125281319022179 +xmax: -0.116631627082825 +ymin: 0.375891804695129 +ymax: 0.384632647037506 +iter: 67.485000610351562 +cx: 0.405000001192093 +cy: -0.200000002980232 +redstretch: 124.000000000000000 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 0 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Fragments b/plug-ins/FractalExplorer/fractalexplorer-examples/Fragments new file mode 100644 index 0000000000..37fa127301 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Fragments @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 2 +xmin: -0.508517742156982 +xmax: -0.475813776254654 +ymin: -0.025438375771046 +ymax: 0.025984741747379 +iter: 177.914001464843750 +cx: -1.018000006675720 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 1 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Hemp b/plug-ins/FractalExplorer/fractalexplorer-examples/Hemp new file mode 100644 index 0000000000..6d941acfa5 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Hemp @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.968750000000000 +xmax: 0.437500000000000 +ymin: -0.703125000000000 +ymax: 0.843750000000000 +iter: 50.000000000000000 +cx: -0.012000000104308 +cy: 0.000000000000000 +redstretch: 87.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 0.000000000000000 +redmode: 0 +greenmode: 2 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/High_Voltage b/plug-ins/FractalExplorer/fractalexplorer-examples/High_Voltage new file mode 100644 index 0000000000..788cfa8010 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/High_Voltage @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 1 +xmin: -0.476808547973633 +xmax: -0.223514556884766 +ymin: -0.017941474914551 +ymax: 0.114898681640625 +iter: 50.000000000000000 +cx: -1.337000012397766 +cy: 0.086000002920628 +redstretch: 127.330001831054688 +greenstretch: 90.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 2 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Hoops b/plug-ins/FractalExplorer/fractalexplorer-examples/Hoops new file mode 100644 index 0000000000..83f09aeb7f --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Hoops @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.345402956008911 +xmax: -0.252956151962280 +ymin: -0.274888515472412 +ymax: -0.204696178436279 +iter: 30.674999237060547 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 67.000000000000000 +bluestretch: 98.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Ice_Crystal b/plug-ins/FractalExplorer/fractalexplorer-examples/Ice_Crystal new file mode 100644 index 0000000000..db6a396a55 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Ice_Crystal @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 1 +xmin: 0.068130433559418 +xmax: 0.116958513855934 +ymin: 0.512302279472351 +ymax: 0.534968316555023 +iter: 202.453994750976562 +cx: 0.356000006198883 +cy: 0.428999990224838 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Leaves b/plug-ins/FractalExplorer/fractalexplorer-examples/Leaves new file mode 100644 index 0000000000..43706e8969 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Leaves @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.350769042968750 +xmax: -0.080402374267578 +ymin: -0.264384269714355 +ymax: -0.041095733642578 +iter: 50.000000000000000 +cx: -0.184000000357628 +cy: 0.000000000000000 +redstretch: 29.000000000000000 +greenstretch: 80.000000000000000 +bluestretch: 7.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Lightning b/plug-ins/FractalExplorer/fractalexplorer-examples/Lightning new file mode 100644 index 0000000000..bb23dc5453 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Lightning @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -1.285429239273071 +xmax: -1.283814907073975 +ymin: 0.428520709276199 +ymax: 0.432528734207153 +iter: 50.000000000000000 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 89.130996704101562 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Makefile.am b/plug-ins/FractalExplorer/fractalexplorer-examples/Makefile.am new file mode 100644 index 0000000000..cf55974a9c --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Makefile.am @@ -0,0 +1,45 @@ +## Process this file with automake to produce Makefile.in + +fractalexplorerdatadir = $(gimpdatadir)/fractalexplorer + +fractalexplorerdata_DATA = \ + Asteroid_Field \ + Bar_Code_Label \ + Beauty_of_Nature \ + Blue_Curtain \ + Car_Track \ + Energetic_Diamond \ + Explosive \ + Flower \ + Fragments \ + Hemp \ + High_Voltage \ + Hoops \ + Ice_Crystal \ + Leaves \ + Lightning \ + Mandelbrot \ + Marble \ + Marble2 \ + Medusa \ + Nautilus \ + Nebula \ + Plant \ + Rose \ + Saturn \ + Snow_Crystal \ + Soma \ + Spark \ + Suns \ + Tentacles \ + The_Green_Place \ + Wave \ + Wood \ + Zooming_Circle + +EXTRA_DIST = $(fractalexplorerdata_DATA) + +files: + @files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \ + echo $$p; \ + done diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Mandelbrot b/plug-ins/FractalExplorer/fractalexplorer-examples/Mandelbrot new file mode 100644 index 0000000000..5a604e51d6 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Mandelbrot @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -0.078803382813931 +xmax: -0.077717751264572 +ymin: -0.880311131477356 +ymax: -0.879459798336029 +iter: 503.066986083984375 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 120.627998352050781 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 2 +bluemode: 0 +redinvert: 1 +greeninvert: 0 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Marble b/plug-ins/FractalExplorer/fractalexplorer-examples/Marble new file mode 100644 index 0000000000..ea3f71a2a2 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Marble @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.235851287841797 +xmax: -0.060367584228516 +ymin: 0.091303825378418 +ymax: 0.220178604125977 +iter: 55.215000152587891 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 127.330001831054688 +redmode: 1 +greenmode: 2 +bluemode: 2 +redinvert: 0 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Marble2 b/plug-ins/FractalExplorer/fractalexplorer-examples/Marble2 new file mode 100644 index 0000000000..a0f26cb354 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Marble2 @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.146484375000000 +xmax: 0.064453125000000 +ymin: 0.154907226562500 +ymax: 0.358154296875000 +iter: 50.000000000000000 +cx: 0.356000006198883 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Medusa b/plug-ins/FractalExplorer/fractalexplorer-examples/Medusa new file mode 100644 index 0000000000..5b74743545 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Medusa @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -1.408687233924866 +xmax: -1.408686757087708 +ymin: -0.135643482208252 +ymax: -0.135642752051353 +iter: 104.293998718261719 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 0 +bluemode: 1 +redinvert: 1 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Nautilus b/plug-ins/FractalExplorer/fractalexplorer-examples/Nautilus new file mode 100644 index 0000000000..0c7da432df --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Nautilus @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.078369140625000 +xmax: 0.158203125000000 +ymin: -0.485778808593750 +ymax: -0.197387695312500 +iter: 134.968994140625000 +cx: 0.109999999403954 +cy: 0.037000000476837 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 1 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Nebula b/plug-ins/FractalExplorer/fractalexplorer-examples/Nebula new file mode 100644 index 0000000000..1246289a17 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Nebula @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.935546875000000 +xmax: 0.226562500000000 +ymin: 0.034790039062500 +ymax: 0.995361328125000 +iter: 67.485000610351562 +cx: 0.428999990224838 +cy: 0.232999995350838 +redstretch: 128.000000000000000 +greenstretch: 120.627998352050781 +bluestretch: 93.000000000000000 +redmode: 2 +greenmode: 2 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Plant b/plug-ins/FractalExplorer/fractalexplorer-examples/Plant new file mode 100644 index 0000000000..29731eca3d --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Plant @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.251464843750000 +xmax: -0.097656250000000 +ymin: -0.626953125000000 +ymax: -0.503356933593750 +iter: 55.215000152587891 +cx: 0.503000020980835 +cy: -0.012000000104308 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 1 +bluemode: 0 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Rose b/plug-ins/FractalExplorer/fractalexplorer-examples/Rose new file mode 100644 index 0000000000..8c88d8e321 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Rose @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 7 +xmin: 0.011789147742093 +xmax: 0.012022980488837 +ymin: 0.040065050125122 +ymax: 0.040298193693161 +iter: 92.025001525878906 +cx: -1.092000007629395 +cy: 0.232999995350838 +redstretch: 124.000000000000000 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 1 +greenmode: 0 +bluemode: 0 +redinvert: 1 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Saturn b/plug-ins/FractalExplorer/fractalexplorer-examples/Saturn new file mode 100644 index 0000000000..ec0542be09 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Saturn @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -0.720550119876862 +xmax: -0.736553728580475 +ymin: 0.128735020756721 +ymax: 0.068184189498425 +iter: 49.080001831054688 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 119.958000183105469 +greenstretch: 85.779998779296875 +bluestretch: 6.031000137329102 +redmode: 0 +greenmode: 0 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Snow_Crystal b/plug-ins/FractalExplorer/fractalexplorer-examples/Snow_Crystal new file mode 100644 index 0000000000..02f2928d05 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Snow_Crystal @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 0 +xmin: -0.562806546688080 +xmax: -0.561547160148621 +ymin: -0.643333077430725 +ymax: -0.642277657985687 +iter: 122.698997497558594 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 113.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 0 +bluemode: 2 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Soma b/plug-ins/FractalExplorer/fractalexplorer-examples/Soma new file mode 100644 index 0000000000..9d9b44666f --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Soma @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.038584709167480 +xmax: 0.094075202941895 +ymin: -0.689266920089722 +ymax: -0.584711074829102 +iter: 98.160003662109375 +cx: 0.405000001192093 +cy: 0.037000000476837 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 2 +redinvert: 0 +greeninvert: 1 +blueinvert: 1 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Spark b/plug-ins/FractalExplorer/fractalexplorer-examples/Spark new file mode 100644 index 0000000000..f4b2ec6993 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Spark @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 7 +xmin: -0.014160156250000 +xmax: 1.014160156250000 +ymin: -0.261108398437500 +ymax: 0.252685546875000 +iter: 42.944999694824219 +cx: -1.386999964714050 +cy: -0.257999986410141 +redstretch: 124.000000000000000 +greenstretch: 112.000000000000000 +bluestretch: 60.000000000000000 +redmode: 0 +greenmode: 2 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 1 +colormode: 1 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Suns b/plug-ins/FractalExplorer/fractalexplorer-examples/Suns new file mode 100644 index 0000000000..683a147c05 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Suns @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 1 +xmin: -0.573436737060547 +xmax: -0.399868011474609 +ymin: -0.177640914916992 +ymax: -0.024647712707520 +iter: 607.361999511718750 +cx: -0.723999977111816 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 0 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Tentacles b/plug-ins/FractalExplorer/fractalexplorer-examples/Tentacles new file mode 100644 index 0000000000..19402f4dc3 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Tentacles @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 6 +xmin: -0.430790066719055 +xmax: -0.421469658613205 +ymin: 0.017559077590704 +ymax: 0.025114785879850 +iter: 67.485000610351562 +cx: -0.086000002920628 +cy: -0.012000000104308 +redstretch: 128.000000000000000 +greenstretch: 37.000000000000000 +bluestretch: 93.000000000000000 +redmode: 2 +greenmode: 2 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/The_Green_Place b/plug-ins/FractalExplorer/fractalexplorer-examples/The_Green_Place new file mode 100644 index 0000000000..8504364f4b --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/The_Green_Place @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 2 +xmin: 0.064453125000000 +xmax: 0.950683593750000 +ymin: -0.389648437500000 +ymax: 0.476440429687500 +iter: 50.000000000000000 +cx: -1.067000031471252 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 110.000000000000000 +bluestretch: 2.000000000000000 +redmode: 0 +greenmode: 1 +bluemode: 1 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Wave b/plug-ins/FractalExplorer/fractalexplorer-examples/Wave new file mode 100644 index 0000000000..e9deae072d --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Wave @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 2 +xmin: -0.937500000000000 +xmax: 1.125000000000000 +ymin: -0.609375000000000 +ymax: 0.609375000000000 +iter: 50.000000000000000 +cx: -1.042999982833862 +cy: -0.037000000476837 +redstretch: 128.000000000000000 +greenstretch: 22.000000000000000 +bluestretch: 101.000000000000000 +redmode: 1 +greenmode: 1 +bluemode: 0 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Wood b/plug-ins/FractalExplorer/fractalexplorer-examples/Wood new file mode 100644 index 0000000000..ffdd12078f --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Wood @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 4 +xmin: -1.287102937698364 +xmax: -1.287102580070496 +ymin: 0.099825143814087 +ymax: 0.099862203001976 +iter: 50.000000000000000 +cx: -0.750000000000000 +cy: -0.200000002980232 +redstretch: 128.000000000000000 +greenstretch: 109.905998229980469 +bluestretch: 2.009999990463257 +redmode: 1 +greenmode: 0 +bluemode: 0 +redinvert: 1 +greeninvert: 1 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/fractalexplorer-examples/Zooming_Circle b/plug-ins/FractalExplorer/fractalexplorer-examples/Zooming_Circle new file mode 100644 index 0000000000..75a704daf3 --- /dev/null +++ b/plug-ins/FractalExplorer/fractalexplorer-examples/Zooming_Circle @@ -0,0 +1,26 @@ +Fractal Explorer Plug-In Version 2 - (c) 1997 +#********************************************************************** +# This is a data file for the Fractal Explorer plug-in for the GIMP * +# Get the plug-in at http://www.mygale.org/~cotting * +#********************************************************************** +fractaltype: 3 +xmin: 0.187500000000000 +xmax: 0.984375000000000 +ymin: 0.843750000000000 +ymax: 1.734375000000000 +iter: 50.000000000000000 +cx: 0.773000001907349 +cy: -0.723999977111816 +redstretch: 128.000000000000000 +greenstretch: 128.000000000000000 +bluestretch: 128.000000000000000 +redmode: 2 +greenmode: 0 +bluemode: 1 +redinvert: 0 +greeninvert: 0 +blueinvert: 0 +colormode: 0 +#********************************************************************** + +#********************************************************************** diff --git a/plug-ins/FractalExplorer/logo.h b/plug-ins/FractalExplorer/logo.h new file mode 100644 index 0000000000..cb94ec445f --- /dev/null +++ b/plug-ins/FractalExplorer/logo.h @@ -0,0 +1,788 @@ +/* GIMP header image file format (Indexed): //logo.h */ + +static unsigned int logo_width = 200; +static unsigned int logo_height = 72; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) \ + pixel[0] = palette_data[data[0]*3+2]; \ + pixel[1] = palette_data[data[0]*3+1]; \ + pixel[2] = palette_data[data[0]*3+0]; \ + data--; + +static unsigned char +palette_data[] = { 4,2,2,4,110,178,32,4,122,4,36, +86,15,3,66,4,58,127,36,8,186,4,34,122,17,2, +34,4,19,66,12,4,162,90,2,69,88,2,48,7,20, +2,25,2,103,8,14,48,4,58,186,90,3,154,82,2, +129,55,2,34,17,2,18,17,34,191,94,2,101,57,2, +70,7,32,154,12,22,157,17,3,50,4,88,150,96,3, +186,86,2,138,87,2,86,212,214,210,4,19,98,52,2, +154,15,11,2,4,132,216,7,18,125,12,6,82,37,12, +18,4,88,189,86,14,48,128,2,157,32,4,138,4,60, +155,4,48,126,60,2,218,7,10,52,13,12,66,129,2, +50,56,2,52,52,14,98,4,47,157,6,20,87,48,2, +24,58,2,101,120,2,141,52,5,170,4,113,215,127,2, +73,4,90,210,4,52,112,36,18,194,59,2,85,42,2, +10,107,2,173,95,2,114,31,3,52,4,79,160,84,3, +189,14,10,40,30,2,69,96,2,58,113,2,126,9,37, +231,17,33,170,28,14,2,4,30,146,68,10,37,132,2, +82,23,4,7,4,10,122,4,36,108,32,2,37,7,27, +2,4,98,175,84,10,146,4,101,191,4,14,146,8,29, +86,4,2,170,8,60,230,84,10,162,72,2,39,102,2, +142,4,142,221,4,49,143,68,12,170,4,124,213,15,4, +74,114,2,69,112,2,158,32,3,23,8,50,190,111,2, +104,6,40,154,96,2,210,6,28,104,60,2,138,61,2, +25,68,2,114,58,2,125,39,2,114,73,2,69,16,4, +58,4,88,177,56,14,26,138,2,173,4,68,176,71,2, +55,76,2,210,4,78,130,17,3,42,6,27,69,112,2, +49,12,26,178,47,13,159,18,11,10,13,11,74,141,2, +58,52,18,234,4,82,186,4,126,198,4,103,213,4,62, +206,4,72,226,12,46,210,72,12,222,12,26,146,20,34, +210,4,113,197,4,131,229,4,48,170,4,76,170,7,43, +95,52,30,218,15,11,170,52,14,202,12,14,86,4,40, +174,108,14,202,156,2,186,60,12,130,5,40,129,73,13, +189,12,42,138,44,14,202,4,59,143,4,124,229,4,69, +191,4,69,157,4,60,114,4,43,110,14,14,58,20,26, +157,28,26,210,4,87,162,4,91,202,4,110,226,4,98, +226,4,101,202,17,14,186,28,18,18,60,2,234,28,10, +114,4,30,114,8,10,162,12,54,186,20,26,130,100,10, +170,40,18,154,4,22,114,28,26,234,4,22,58,4,66, +226,4,54,202,12,42,202,4,38,98,4,145,234,4,76, +146,4,94,148,4,138,213,4,94,186,4,54,126,4,54, +154,4,118,211,4,106,178,4,106,188,4,54,142,4,94, +170,4,70,202,4,118,197,4,54,173,4,82,178,72,4, +172,36,10,138,76,14,162,4,98,210,4,118,226,112,2, +114,24,19,8,30,2,85,84,6,226,141,2,73,28,30, +10,28,46,186,112,4,206,36,10,90,36,2,174,108,2, +58,41,3,130,44,10,194,9,33,130,92,2,162,51,2, +42,12,32,162,81,3,146,44,11,26,28,6,146,44,2, +178,30,12,10,60,10,178,64,2,146,28,10,178,92,10, +210,5,41,146,40,2,102,96,2,125,100,2,88,74,2, +157,142,2,159,26,10,55,143,2,50,73,2,102,134,2, +142,73,2,84,127,2,126,142,2,82,156,2,178,28,10, +158,28,26,114,84,14,202,12,4,10,5,20,74,17,2, +26,92,2,194,7,19,106}; + +static unsigned char header_data[] = { 71,99,218,218,99,11,71,218,71,71, +218,99,99,99,71,99,218,99,99,99,99,218,71,218,99,218,218,99,99,218, +218,99,99,218,99,218,99,58,218,99,99,99,58,218,99,99,99,58,99,58, +99,58,11,58,99,58,58,11,99,58,99,58,99,99,99,218,99,218,99,58, +99,71,99,218,71,12,12,12,12,12,12,12,12,12,92,19,19,19,92,92, +92,92,19,108,19,19,19,19,19,19,53,53,53,53,101,19,19,53,53,19, +19,19,12,92,92,12,12,12,71,71,218,99,218,218,71,71,12,12,218,99, +58,58,58,99,99,99,58,99,99,99,11,58,11,58,58,99,58,99,99,99, +58,99,99,99,99,58,99,99,99,99,99,218,99,99,11,99,99,99,11,99, +99,218,218,218,99,218,99,99,218,218,99,99,218,99,218,218,99,99,218,11, +218,71,99,218,99,218,218,99,71,8,218,99,218,218,99,99,99,99,99,99, +218,218,99,99,218,99,218,99,218,71,99,99,99,218,99,99,218,99,99,99, +218,218,99,99,99,99,58,99,58,30,99,99,99,99,99,99,58,99,99,58, +99,58,99,58,99,99,58,58,58,99,58,58,99,218,218,71,99,99,71,71, +71,123,12,118,71,71,12,71,123,12,12,19,19,19,53,19,19,53,53,19, +19,53,101,63,20,63,20,63,53,53,53,101,53,53,53,19,53,53,53,19, +92,12,12,12,71,12,12,12,12,12,92,71,218,218,71,218,71,71,71,71, +99,218,58,58,58,99,99,99,99,58,58,58,99,58,99,58,58,99,58,58, +99,99,58,99,99,99,99,58,99,58,30,99,99,99,218,99,58,99,99,58, +11,99,99,218,99,218,218,99,99,218,71,99,218,99,99,218,99,99,218,99, +11,218,99,218,99,11,218,99,99,8,71,71,71,99,218,71,218,99,71,218, +11,99,218,218,99,218,99,218,99,99,99,99,218,99,99,99,99,99,218,99, +99,99,99,99,99,11,99,99,99,99,99,99,58,99,58,99,58,99,58,58, +99,11,58,58,99,58,99,99,58,58,218,99,123,71,71,71,123,71,71,218, +99,99,218,71,12,12,12,12,92,19,19,53,19,53,53,53,53,19,53,53, +53,53,19,53,19,53,53,53,53,53,63,63,101,63,63,20,53,19,53,53, +53,19,92,92,12,12,12,71,71,71,71,12,12,71,71,12,12,12,12,12, +12,218,218,99,58,58,99,58,99,58,99,58,99,99,58,218,58,99,58,99, +99,99,99,11,58,99,99,58,99,99,58,58,99,99,99,99,99,99,99,99, +99,58,218,99,218,99,99,99,218,99,99,218,99,11,218,99,218,218,99,99, +218,99,218,11,99,71,99,218,71,8,99,99,218,99,99,99,218,99,99,218, +218,99,11,99,99,218,99,218,99,218,218,99,58,99,99,99,58,11,99,99, +58,99,99,58,58,58,58,99,99,99,99,218,58,99,99,99,58,58,99,99, +58,58,99,58,99,58,99,99,58,58,99,218,71,71,218,218,218,58,58,58, +218,99,71,123,12,12,12,19,19,108,108,108,92,92,92,12,71,12,12,92, +19,53,53,53,101,53,53,19,53,101,53,20,53,79,79,0,34,79,20,63, +53,53,53,19,19,19,12,12,12,71,71,71,71,71,71,123,71,12,12,12, +12,12,71,71,218,58,99,58,218,58,218,99,58,99,58,99,99,218,58,58, +58,99,58,58,99,99,58,99,58,99,99,218,58,58,99,99,99,99,99,99, +58,11,99,99,218,218,218,99,218,99,99,218,218,99,218,99,99,218,218,99, +218,99,71,218,99,218,99,99,99,8,218,218,99,218,99,218,99,218,218,99, +11,218,218,218,218,99,71,99,218,99,99,99,218,58,99,99,99,99,218,30, +58,99,58,99,58,11,58,99,58,99,58,58,58,99,58,58,99,99,58,58, +58,99,58,99,58,58,99,58,218,99,99,218,58,99,58,58,58,58,58,218, +71,12,12,71,71,12,12,12,12,71,71,118,71,71,118,71,71,12,223,19, +19,53,53,53,53,63,229,20,79,20,34,0,20,101,101,63,20,101,101,53, +108,53,53,53,53,53,101,19,92,12,12,12,12,71,71,218,218,218,71,71, +118,12,71,71,218,218,58,58,58,58,58,58,218,58,58,58,99,99,218,99, +58,58,99,99,58,99,58,99,58,58,58,99,99,99,58,99,99,99,58,58, +99,58,58,99,99,99,99,99,99,99,218,99,99,218,99,218,218,99,99,218, +99,58,99,99,218,99,218,218,218,8,99,218,99,218,99,218,11,99,218,99, +99,99,99,99,218,99,58,99,99,99,58,99,218,99,99,99,99,99,58,99, +58,218,99,99,99,58,218,58,58,58,99,99,58,99,218,58,99,99,58,218, +58,99,58,99,99,99,58,99,58,58,58,58,99,58,58,58,58,218,218,12, +71,71,71,12,12,71,71,12,71,12,71,71,71,71,12,92,19,53,53,53, +101,63,79,34,251,0,0,63,20,53,19,53,53,53,53,19,19,53,19,19, +19,108,19,19,19,19,19,19,53,53,108,12,12,12,71,71,218,58,58,58, +99,218,71,71,71,12,218,99,99,58,58,58,58,218,58,58,58,58,58,99, +99,58,58,99,58,218,58,99,99,99,99,58,99,128,99,58,99,99,11,99, +99,58,11,58,99,99,99,218,58,11,99,58,99,218,99,99,218,99,99,99, +218,71,99,99,218,99,11,99,218,8,218,99,218,99,218,99,99,218,99,218, +58,218,58,218,99,99,218,99,58,99,99,99,99,78,11,58,99,58,99,99, +99,58,58,99,58,11,58,58,218,99,99,58,58,58,99,58,58,58,99,99, +58,58,58,58,58,58,99,58,99,99,99,58,58,58,58,58,218,71,118,12, +71,71,71,71,71,12,71,71,71,71,71,12,92,19,19,53,53,63,20,251, +0,79,79,0,79,34,34,79,0,63,229,20,63,101,53,101,19,53,19,92, +12,71,12,92,12,12,12,12,12,92,19,92,92,71,12,118,71,218,99,58, +58,58,58,58,218,123,71,218,58,58,58,99,58,58,58,218,58,218,58,58, +218,58,99,58,58,58,99,99,58,99,58,99,218,99,99,99,58,58,58,11, +58,58,99,58,99,99,30,99,99,99,58,218,218,30,99,218,99,99,99,218, +99,99,218,218,99,99,218,71,99,8,99,99,71,99,218,218,99,218,99,218, +99,218,99,58,11,58,99,99,11,58,99,58,99,99,99,99,58,58,99,99, +58,99,99,99,99,58,99,78,58,58,99,99,218,78,58,218,58,99,212,58, +99,58,58,58,218,58,58,58,58,58,58,58,58,58,218,71,12,12,71,71, +123,218,218,58,99,71,123,71,71,12,19,19,19,53,53,19,19,53,63,53, +101,101,101,63,101,101,20,20,79,0,0,79,79,34,251,79,79,251,101,53, +19,92,12,71,71,71,218,12,218,12,71,71,71,71,71,12,71,71,123,71, +58,58,58,58,58,58,58,99,99,58,58,58,99,58,58,58,99,58,99,58, +99,58,58,99,58,58,58,58,99,58,99,58,99,58,99,58,99,99,58,58, +99,99,99,58,99,58,58,58,99,99,99,30,128,58,99,99,99,99,99,58, +218,99,99,218,218,99,99,218,71,8,71,218,99,99,99,99,218,99,99,99, +99,30,58,11,58,58,99,58,58,58,58,30,58,58,99,99,99,58,99,58, +99,58,99,58,58,58,218,99,58,99,58,58,58,218,99,58,58,58,58,58, +58,99,99,99,58,99,99,58,58,212,99,58,58,218,71,71,218,218,99,58, +58,58,58,218,123,71,71,12,108,19,19,108,19,19,223,92,19,92,12,12, +19,19,19,19,53,53,63,63,229,0,34,34,79,0,79,0,75,34,0,34, +79,20,53,19,92,12,71,71,71,218,71,123,71,123,71,71,71,71,71,71, +71,218,58,58,58,58,58,58,58,99,58,58,58,58,58,58,58,58,99,58, +58,99,99,58,99,58,58,58,58,58,58,99,58,99,58,99,58,58,99,99, +58,58,99,99,58,58,218,58,58,99,58,99,11,58,58,99,58,218,99,99, +99,99,218,99,99,218,99,99,99,8,99,218,99,218,99,99,99,99,58,58, +11,58,99,58,58,30,58,11,58,11,58,99,99,58,99,58,58,58,99,58, +58,99,58,99,99,58,58,99,58,99,58,99,58,99,212,58,58,58,58,58, +58,58,58,58,58,58,58,58,58,58,212,58,218,218,218,99,58,58,58,58, +58,99,71,71,71,12,71,71,12,12,12,71,71,123,71,218,71,71,71,92, +19,108,63,79,229,126,0,79,0,0,34,34,34,126,34,251,79,0,126,34, +79,0,79,20,63,19,19,12,71,71,71,218,71,99,71,71,71,71,71,71, +71,71,218,58,58,58,212,58,58,58,58,58,58,58,58,58,58,58,58,58, +58,58,99,58,58,99,58,58,99,99,128,218,58,58,99,58,99,58,58,99, +218,58,58,218,99,99,99,99,99,99,58,99,99,58,30,218,99,99,99,99, +99,99,218,99,99,99,218,218,99,8,218,99,99,99,58,99,99,99,99,99, +58,58,218,99,99,99,58,99,58,58,58,99,58,99,58,99,99,99,58,58, +99,99,58,58,58,58,58,58,99,99,58,99,99,58,58,58,58,99,58,58, +99,58,99,58,78,212,99,212,99,58,58,99,58,58,78,78,246,99,212,58, +99,71,123,71,71,71,71,71,218,218,71,123,218,218,218,118,12,19,63,63, +0,0,0,34,34,0,34,79,79,79,0,34,79,79,20,101,53,101,53,19, +53,53,101,101,53,53,19,19,19,92,218,218,218,218,218,212,78,58,218,218, +71,71,71,11,58,246,58,78,246,58,58,58,99,99,58,58,99,58,212,58, +99,58,99,58,58,99,58,58,58,58,58,212,218,58,58,99,58,58,99,58, +99,99,99,58,58,99,99,99,58,99,58,58,99,99,99,58,58,99,99,99, +99,99,99,11,58,99,99,99,218,8,99,99,218,99,99,218,99,218,58,58, +11,78,58,99,58,99,58,99,58,11,58,99,58,99,58,58,58,99,99,58, +99,99,99,58,58,58,58,58,58,58,58,58,58,58,58,212,99,58,212,99, +58,58,78,58,78,58,58,58,58,58,58,58,58,58,246,58,246,58,58,71, +218,71,71,71,218,71,71,71,71,218,218,71,71,92,92,53,63,126,79,0, +0,79,0,79,34,79,0,126,79,79,79,79,79,229,229,101,53,108,92,71, +71,71,71,71,71,12,12,19,108,19,92,71,71,71,71,218,212,246,78,58, +58,218,218,71,71,58,58,212,212,78,212,78,78,58,58,58,58,58,99,58, +78,58,58,99,58,58,58,58,58,58,58,58,99,58,99,58,58,212,99,58, +58,99,58,99,58,99,99,58,58,99,99,58,58,58,58,11,78,99,99,99, +99,58,99,58,71,99,99,99,99,8,99,99,99,218,99,58,99,30,58,11, +58,11,58,58,99,58,58,99,58,99,58,99,99,58,99,58,99,58,58,99, +58,58,58,58,58,78,58,99,58,99,58,58,58,58,99,58,212,99,58,58, +58,78,78,78,58,58,58,58,58,212,58,78,58,78,78,78,58,99,218,218, +71,218,218,71,58,99,58,99,71,71,71,12,19,20,79,251,0,251,79,251, +79,63,126,79,79,79,79,229,79,79,79,126,126,79,79,63,20,53,53,92, +12,12,218,71,71,218,218,218,71,218,71,71,71,218,71,218,218,58,246,246, +78,212,78,58,218,218,58,58,58,246,78,212,78,212,58,58,58,58,58,212, +78,78,78,58,58,99,58,58,58,58,58,58,58,58,58,218,99,99,58,99, +58,58,218,99,58,58,99,58,99,99,58,99,99,99,58,99,99,58,58,58, +218,99,11,58,99,99,99,218,99,8,99,30,218,58,11,99,99,58,99,58, +99,58,58,99,218,99,218,58,99,99,58,58,58,58,99,58,99,99,58,99, +58,58,58,78,78,58,58,58,58,58,99,246,78,78,58,58,58,58,58,78, +78,212,78,246,246,58,58,58,212,58,212,246,78,246,58,212,218,218,218,218, +218,58,246,58,246,58,218,218,123,12,19,19,53,53,101,53,63,101,63,63, +63,63,63,63,63,101,63,53,63,53,53,53,53,108,19,19,19,19,108,19, +92,92,12,12,71,71,218,99,99,218,218,218,218,218,71,71,71,218,218,246, +78,78,246,78,78,78,58,58,58,78,78,78,78,246,58,58,58,58,58,78, +212,78,78,58,58,58,58,99,58,58,58,58,58,58,99,58,58,58,58,58, +58,99,58,58,99,58,58,58,58,58,58,99,58,58,58,58,58,99,99,99, +58,99,58,99,99,58,99,99,99,8,99,99,30,58,58,58,58,58,58,99, +58,11,99,58,99,58,58,58,58,58,58,99,58,58,58,58,58,58,99,58, +99,58,78,58,58,58,99,58,58,78,246,78,58,78,58,58,58,58,78,212, +246,78,246,78,78,99,212,246,78,246,58,246,246,78,246,218,218,218,58,58, +246,78,78,246,58,218,218,71,12,12,108,92,108,19,108,53,63,63,63,53, +53,53,19,223,92,92,49,118,118,118,118,118,118,118,71,118,118,12,12,12, +92,71,71,123,218,99,11,58,58,58,58,78,58,99,99,123,71,218,218,218, +246,246,78,212,78,212,78,246,78,78,58,78,246,78,246,78,58,58,58,58, +99,78,246,78,246,99,58,58,58,58,58,78,78,78,78,99,58,99,58,99, +78,58,58,99,58,218,218,58,58,99,58,58,58,218,99,58,58,58,58,11, +58,99,99,99,58,99,99,218,58,8,99,99,58,99,58,11,58,11,58,58, +99,58,99,58,99,58,99,58,58,218,58,58,58,99,58,99,58,58,58,99, +78,58,58,58,99,58,58,78,78,58,246,78,246,99,58,58,58,212,78,78, +246,58,246,58,78,78,78,58,246,78,78,58,246,58,58,58,212,58,246,78, +212,246,58,58,71,71,71,71,12,92,92,92,108,53,53,53,19,19,223,223, +49,223,92,49,49,223,92,49,118,118,118,71,118,112,118,11,11,112,71,112, +71,71,11,11,11,99,99,58,58,78,78,78,246,78,246,58,99,71,218,71, +218,78,78,246,78,246,58,246,78,246,212,58,246,58,246,78,212,78,246,58, +58,58,78,246,246,78,78,99,58,58,58,212,78,58,78,58,58,58,58,58, +78,58,78,99,58,58,99,58,58,58,58,99,58,58,99,218,58,99,58,58, +58,58,99,58,99,99,58,99,99,8,99,99,58,58,58,99,58,99,99,58, +99,58,58,58,58,58,58,218,99,58,99,58,58,58,58,58,99,58,58,78, +58,78,78,78,78,58,78,58,78,78,78,212,78,58,78,58,78,212,78,246, +78,246,78,78,212,246,246,78,246,212,246,246,78,246,58,246,78,246,58,246, +246,58,99,218,218,218,71,12,92,19,19,19,19,19,223,223,49,223,49,118, +49,112,30,30,237,103,208,208,245,208,245,208,245,245,245,103,208,103,22,237, +30,30,11,11,11,11,71,71,11,99,58,78,78,246,58,246,246,246,58,99, +99,218,212,78,246,78,246,78,246,58,78,58,246,78,58,246,78,212,78,246, +58,212,58,78,78,212,78,78,58,58,99,78,78,78,78,78,58,58,99,58, +58,78,78,78,58,58,99,58,99,58,58,99,58,218,58,58,99,58,58,218, +99,58,99,99,58,99,30,99,99,8,58,99,58,99,58,58,58,99,58,99, +58,218,218,58,99,58,99,58,58,58,78,99,78,58,99,58,58,78,58,78, +78,58,78,78,58,78,78,246,246,212,78,78,78,58,78,246,78,246,58,246, +212,78,58,78,78,58,246,78,78,78,58,246,78,246,78,58,246,78,78,78, +58,218,99,11,71,12,92,92,92,223,223,223,223,223,49,118,112,22,237,208, +72,245,55,243,245,72,72,72,65,208,236,208,208,245,72,55,243,55,55,243, +245,245,245,103,237,237,30,11,11,112,71,11,99,58,78,246,246,246,246,78, +58,218,58,58,246,78,212,78,246,78,246,78,212,78,78,212,78,246,78,78, +58,78,78,78,78,78,246,246,246,58,58,78,58,246,78,212,78,78,99,58, +58,78,58,58,58,58,58,99,58,58,58,58,78,58,58,99,99,58,58,58, +99,218,58,99,99,99,58,99,58,8,99,99,99,58,11,58,58,58,99,58, +58,58,58,58,58,58,58,99,99,78,78,58,58,78,58,58,99,78,78,78, +78,78,78,78,78,78,212,246,246,246,246,78,78,246,246,58,246,78,246,78, +78,78,212,246,246,246,78,78,212,246,246,246,58,246,246,78,246,246,78,58, +218,99,71,12,12,92,92,82,223,49,223,118,112,22,208,72,72,208,65,22, +22,112,11,112,112,112,112,112,118,118,118,112,112,112,30,244,244,30,237,65, +236,72,55,55,243,243,208,208,237,237,11,71,11,11,71,11,99,58,246,246, +246,78,78,246,58,246,78,246,58,246,58,246,58,246,246,78,78,78,212,78, +212,246,212,78,246,246,58,78,78,246,99,246,246,58,246,58,78,78,78,58, +78,78,78,78,78,78,58,58,58,99,58,58,78,99,58,58,58,218,99,99, +58,58,99,58,99,58,58,99,99,8,58,58,99,58,99,218,99,58,99,99, +99,58,99,58,99,58,58,58,58,78,58,58,58,58,58,58,58,78,212,78, +78,58,246,78,58,246,246,246,246,246,246,246,78,58,246,78,246,58,246,58, +246,78,78,78,58,246,212,78,78,78,58,246,78,212,246,58,78,212,58,99, +218,71,12,92,19,223,49,49,118,62,30,22,208,208,103,30,244,112,244,118, +112,23,49,49,49,49,49,49,49,49,82,82,223,82,49,118,23,118,118,112, +11,30,237,22,65,245,55,243,245,245,103,237,237,11,71,11,71,71,218,58, +246,246,78,246,78,212,78,246,246,78,246,246,78,78,212,78,212,78,246,78, +78,58,246,78,58,246,78,212,78,246,78,78,78,78,78,212,246,246,246,78, +58,78,78,78,58,78,78,58,58,58,58,58,99,58,58,58,58,58,99,58, +58,58,58,58,58,99,99,58,58,8,99,99,58,58,58,99,99,99,99,58, +58,99,78,58,78,99,58,58,99,78,78,78,58,78,58,58,78,246,78,212, +78,78,58,78,246,246,246,246,246,246,58,78,78,246,58,246,78,246,78,246, +78,212,78,212,212,246,78,78,246,246,78,212,58,99,212,246,246,58,99,218, +118,12,92,223,223,49,49,11,237,208,208,103,244,23,118,112,118,112,49,49, +19,82,82,82,223,49,66,49,49,82,223,223,101,19,223,82,223,82,223,82, +82,49,23,112,11,244,30,65,72,55,55,245,208,22,237,112,11,118,71,218, +218,58,58,78,246,78,212,78,78,212,99,78,212,246,78,246,78,246,78,212, +246,246,78,246,246,78,246,78,246,58,246,78,58,78,246,246,246,246,212,246, +78,78,78,78,78,58,78,78,99,58,78,78,78,99,58,58,99,58,99,99, +58,99,99,99,99,58,99,58,99,8,99,99,99,58,58,99,58,58,99,58, +58,58,78,78,58,58,58,58,58,58,78,78,78,78,78,58,246,246,246,246, +246,78,78,212,246,246,246,246,246,246,78,212,78,246,78,212,78,246,58,246, +78,246,78,58,58,212,246,58,78,246,246,58,58,58,58,246,58,218,71,12, +223,223,49,49,49,30,65,72,72,30,112,118,118,112,118,49,223,223,223,49, +244,244,244,244,23,23,23,23,70,66,49,70,49,70,70,118,23,23,23,23, +49,223,19,82,223,223,23,11,244,237,208,72,55,55,208,103,30,11,11,49, +71,71,99,58,246,78,246,246,58,246,58,58,246,212,78,246,58,246,78,58, +58,212,78,78,212,78,212,78,78,78,212,78,78,78,246,212,246,246,246,212, +246,58,78,78,78,78,58,78,78,99,58,58,78,58,58,58,99,58,58,58, +58,58,58,58,99,58,99,58,99,8,99,58,58,218,58,58,58,99,58,58, +58,99,58,58,99,58,78,78,78,78,78,78,78,58,246,246,246,212,246,246, +212,246,78,246,246,246,246,246,212,246,246,78,246,58,212,246,78,78,78,246, +58,246,212,99,58,246,78,246,246,58,58,58,58,78,246,58,99,118,12,92, +223,223,223,11,22,72,208,244,49,112,112,118,49,82,223,49,244,244,242,62, +23,62,23,23,244,244,244,244,244,244,62,30,244,244,244,244,23,112,210,23, +62,244,244,23,223,82,53,82,49,112,30,30,65,72,55,245,208,237,30,112, +71,49,118,71,99,78,78,78,246,246,58,99,58,246,212,78,246,58,246,212, +99,58,212,246,78,246,78,246,212,246,78,246,246,212,246,246,246,212,246,246, +246,246,78,78,246,246,78,78,78,78,58,58,78,58,58,58,58,58,99,99, +99,78,99,58,99,99,58,99,58,8,58,99,58,99,99,58,58,99,58,58, +58,58,58,58,78,58,78,78,58,78,58,246,78,78,78,212,246,246,212,246, +246,246,246,246,246,246,246,246,246,246,246,58,246,58,99,212,246,212,78,78, +78,99,58,58,78,246,58,78,246,58,58,58,58,212,58,218,71,12,49,49, +49,112,22,72,65,112,49,112,112,112,223,19,118,62,244,62,62,23,23,244, +244,244,244,112,23,49,49,223,19,223,82,223,223,49,223,23,118,112,244,30, +62,62,62,62,23,62,23,223,82,8,82,71,30,244,22,72,55,245,103,237, +11,71,12,12,71,99,78,78,78,58,212,58,58,58,58,212,78,58,246,78, +58,58,58,212,78,246,58,78,78,212,212,246,246,246,212,246,246,246,246,246, +246,246,58,78,78,58,246,212,78,78,58,78,58,78,78,78,58,78,58,58, +218,58,58,99,58,99,99,99,58,8,218,99,58,58,58,99,58,58,99,78, +78,58,99,58,58,78,58,78,246,78,78,58,78,212,246,246,246,246,246,246, +246,246,246,212,246,212,246,246,246,212,78,246,58,58,58,246,78,78,212,246, +58,58,58,58,212,78,246,212,58,58,58,58,58,58,71,12,49,223,223,49, +30,208,72,30,49,49,112,49,223,223,23,22,244,62,23,23,62,22,112,118, +49,49,223,118,23,244,30,242,22,242,242,62,242,244,244,112,23,49,49,223, +23,112,30,244,62,112,210,23,23,49,82,8,223,244,237,30,208,55,243,245, +22,30,71,118,12,71,99,78,78,246,212,58,58,58,58,246,246,246,78,246, +58,58,58,78,212,78,246,246,246,58,58,212,246,246,246,246,246,246,246,246, +246,78,246,58,246,246,246,78,212,78,78,78,58,78,58,78,58,58,99,58, +58,58,99,58,58,58,58,58,58,8,58,99,58,58,58,58,99,58,78,78, +58,58,78,58,58,78,78,58,78,78,78,78,78,246,212,246,246,246,246,246, +246,246,246,246,246,246,212,246,246,246,78,58,58,58,58,246,78,78,246,99, +212,58,212,58,212,78,78,58,58,218,58,212,58,99,71,49,223,49,49,30, +55,72,112,49,244,11,49,82,112,242,242,62,23,62,244,112,118,223,82,118, +30,236,29,225,231,33,248,42,42,42,219,2,42,219,110,107,231,29,65,244, +112,223,223,49,112,30,30,23,23,23,23,49,82,101,49,30,30,242,72,243, +208,103,30,71,118,12,71,99,78,78,78,58,58,58,58,58,78,58,246,78, +58,58,99,58,246,58,246,58,246,58,99,58,212,246,246,212,246,246,246,246, +246,246,246,246,212,246,246,246,246,78,58,78,78,78,78,78,58,78,78,78, +58,78,99,99,99,58,58,99,99,8,99,58,99,99,58,58,58,58,78,78, +78,78,58,58,58,78,78,78,78,78,246,246,58,246,246,246,246,246,246,246, +246,246,212,246,99,58,246,246,246,246,212,58,58,58,99,212,78,212,212,58, +78,58,58,58,246,246,78,58,71,218,58,58,11,71,118,223,49,23,103,243, +22,49,118,30,118,82,49,30,242,62,70,62,244,118,223,82,112,65,93,205, +217,42,80,147,98,4,26,8,8,8,8,121,8,8,26,4,98,210,111,219, +29,29,65,112,223,82,23,30,244,62,62,62,62,49,82,82,112,30,30,65, +243,245,103,30,71,118,12,71,218,212,246,58,58,212,212,58,58,246,212,78, +58,58,212,58,58,246,78,246,58,58,58,58,246,212,246,246,246,246,246,246, +246,212,246,246,246,246,212,246,246,212,78,246,212,78,58,78,78,78,58,78, +78,78,58,58,58,58,99,58,58,8,58,58,58,58,58,58,58,58,237,78, +58,78,78,58,78,78,212,78,246,78,78,246,246,246,246,246,246,246,246,246, +246,246,246,58,58,58,246,246,246,246,58,58,99,58,58,246,246,78,99,78, +246,78,58,58,58,58,58,218,12,99,58,99,71,92,49,223,118,22,41,65, +223,23,30,118,19,23,22,242,23,23,30,112,223,19,112,29,222,232,87,80, +98,26,121,8,20,253,20,20,20,20,101,20,20,20,253,253,20,8,121,26, +4,14,2,231,29,30,49,82,112,30,244,62,23,210,118,82,101,223,30,244, +65,55,243,103,237,71,118,71,71,99,58,58,58,58,218,58,58,58,246,212, +58,58,212,78,99,58,246,246,78,58,58,58,58,246,246,246,246,246,246,246, +246,246,246,212,246,246,246,246,246,246,246,78,78,78,78,78,58,78,58,78, +78,58,58,58,78,99,58,58,99,8,99,58,58,99,99,58,58,58,58,237, +78,78,58,78,78,246,78,246,78,246,78,246,246,246,246,246,246,246,246,246, +246,246,58,58,58,58,246,246,246,58,99,78,246,212,99,246,212,58,78,246, +58,246,58,58,58,212,218,12,118,58,58,71,12,49,19,49,237,41,65,49, +118,112,223,82,244,236,62,66,62,30,82,8,112,93,68,6,137,88,162,253, +253,20,253,19,223,23,244,244,54,242,54,242,244,62,112,49,223,20,20,20, +20,253,26,98,14,33,29,244,82,101,112,22,62,62,62,23,49,53,82,30, +112,22,243,243,208,11,71,118,12,218,99,58,58,58,12,71,58,58,58,58, +99,58,58,246,246,58,58,246,246,58,58,58,99,58,246,246,246,246,78,58, +246,212,246,246,246,246,246,212,246,246,78,78,78,78,58,78,78,78,78,58, +78,58,78,237,78,58,99,99,78,8,58,99,58,58,78,78,78,78,78,78, +58,78,78,58,78,246,78,212,246,246,246,246,246,246,246,246,246,103,246,246, +246,246,58,58,58,99,212,246,246,58,212,78,246,58,58,58,58,58,212,78, +78,78,58,58,58,58,123,49,218,99,11,118,223,223,82,237,41,208,23,118, +237,223,82,244,18,210,23,23,112,19,223,103,64,6,148,147,26,253,20,8, +66,23,54,111,219,219,137,24,76,24,163,25,137,42,204,42,151,109,244,223, +20,20,20,20,8,4,111,231,236,23,82,12,237,62,62,23,62,223,253,223, +237,244,22,41,245,103,11,112,118,71,218,58,58,99,92,92,128,58,58,58, +58,58,58,212,78,58,58,212,58,58,58,78,78,58,212,246,246,246,58,58, +212,246,212,246,246,246,246,246,246,212,246,78,246,246,78,78,78,78,78,58, +78,58,58,78,99,58,58,58,99,8,99,58,58,58,58,78,78,58,78,78, +78,78,78,78,78,58,246,246,246,246,246,246,246,246,103,246,246,246,246,246, +246,78,58,58,58,58,58,212,58,58,78,212,78,78,99,58,58,212,78,246, +212,212,58,58,58,218,92,12,218,99,71,12,223,82,118,243,55,23,223,30, +223,19,244,93,54,49,23,112,82,82,245,153,138,234,162,8,253,101,49,30, +111,125,24,201,142,16,159,142,43,95,197,156,193,193,51,141,224,25,248,231, +65,118,20,20,20,20,121,210,231,55,244,82,49,30,244,62,62,244,223,20, +118,237,112,208,243,245,237,71,118,49,71,58,58,218,92,92,12,58,58,99, +58,58,212,78,212,212,58,58,58,58,58,212,78,58,58,246,246,246,99,58, +99,246,246,246,246,246,246,246,246,246,212,246,58,78,78,78,78,78,58,78, +78,58,78,78,58,78,58,99,58,8,99,99,58,58,58,78,78,58,78,58, +78,78,78,246,78,78,78,246,246,246,246,246,246,246,246,103,246,246,246,246, +246,58,58,58,58,58,58,58,58,58,78,78,246,78,58,58,58,212,78,58, +58,78,58,58,58,12,92,12,99,218,118,19,82,223,22,116,237,49,112,112, +101,112,93,109,70,112,118,82,223,55,136,185,44,26,253,253,82,62,107,163, +117,16,114,159,161,106,98,46,26,26,26,26,26,4,32,81,44,142,43,234, +10,56,236,23,20,20,20,8,4,219,225,237,19,82,11,244,62,54,62,223, +20,112,30,244,72,239,103,237,71,12,12,71,58,71,92,92,12,128,58,58, +58,58,246,78,246,58,58,58,99,58,58,246,78,78,58,246,246,58,58,58, +58,212,246,212,246,246,246,246,246,246,78,78,246,58,246,58,78,246,78,58, +78,58,78,78,58,58,58,58,58,8,58,58,58,58,78,237,58,78,78,78, +78,78,78,58,246,246,212,246,246,246,246,246,246,246,246,246,246,246,246,246, +78,58,58,58,58,58,99,58,58,246,246,246,58,246,58,58,58,78,246,218, +11,58,58,58,58,12,92,71,218,11,49,223,101,23,239,93,23,118,244,223, +223,65,29,70,70,112,82,82,72,233,135,152,121,253,20,49,242,179,176,39, +198,156,32,47,26,26,69,113,26,47,9,47,162,113,26,121,113,252,152,159, +43,234,217,238,30,253,20,251,8,4,107,17,30,82,223,22,62,62,54,244, +82,19,237,112,244,41,245,30,112,71,92,71,99,71,12,92,92,71,78,58, +58,246,246,58,78,212,58,58,58,58,58,78,246,58,99,58,212,58,58,58, +58,78,246,246,246,246,246,246,246,246,246,246,78,78,78,78,246,58,78,78, +58,58,58,99,58,99,58,58,58,8,58,99,99,58,58,78,78,58,78,58, +78,58,78,78,78,78,78,246,246,246,246,246,246,246,246,246,78,246,246,246, +58,58,78,58,78,58,58,99,58,78,58,246,246,58,58,58,212,58,58,12, +71,58,58,58,99,92,92,71,218,71,223,8,19,22,150,30,49,11,23,101, +30,93,54,49,112,49,20,30,254,181,95,26,253,253,49,65,163,166,206,202, +52,26,8,121,4,161,43,114,139,131,57,200,195,188,192,88,26,26,121,98, +197,67,234,145,230,22,82,20,20,8,98,107,100,112,253,112,103,244,54,62, +49,20,49,237,118,208,243,103,11,11,12,92,92,92,92,12,49,12,58,58, +78,58,246,78,246,78,212,99,58,58,78,246,58,78,58,58,58,99,58,58, +58,99,246,246,246,246,246,246,246,246,246,246,246,78,246,78,246,78,58,78, +78,58,78,78,78,58,58,99,58,8,99,58,58,58,99,78,58,78,78,78, +78,78,78,78,78,246,246,246,246,246,246,246,246,246,246,246,58,212,58,246, +99,212,58,99,78,99,58,58,78,246,58,58,58,78,78,58,78,78,99,71, +12,71,58,58,12,12,12,71,11,12,223,101,49,243,100,118,223,112,82,19, +93,225,113,23,244,101,223,41,129,199,52,253,20,223,242,124,39,57,117,122, +121,121,47,44,195,35,94,196,165,189,189,189,27,84,200,139,67,186,26,121, +240,106,159,234,175,68,242,20,20,20,8,210,238,93,223,19,237,244,23,54, +62,19,101,244,112,30,243,208,237,11,12,92,49,223,12,12,92,12,58,78, +246,78,58,246,78,212,78,78,58,58,212,58,58,58,78,99,58,58,99,58, +58,58,246,246,246,246,246,246,246,246,246,246,78,246,58,78,58,78,78,78, +78,78,237,78,58,58,58,58,58,8,99,58,99,58,78,78,78,58,78,78, +78,78,78,78,78,58,246,246,246,246,103,246,246,246,246,218,58,58,78,78, +58,99,71,12,58,78,58,78,58,78,123,12,78,78,58,212,78,78,123,92, +12,12,99,99,12,92,92,71,11,118,82,101,112,116,236,82,112,112,82,118, +100,110,66,23,49,101,244,215,73,43,69,253,101,23,219,59,97,202,52,8, +8,4,120,97,187,139,27,143,46,113,26,26,46,88,60,27,131,200,192,47, +82,66,81,159,234,170,68,118,20,251,20,26,2,64,244,101,118,22,23,62, +62,49,20,118,244,23,208,245,30,11,71,12,92,12,12,49,12,12,71,58, +246,246,78,246,78,246,58,78,58,78,212,218,12,246,78,99,58,78,78,11, +12,58,58,246,246,103,246,246,58,246,246,246,246,78,246,78,78,78,58,78, +78,58,58,58,78,58,58,99,58,8,99,58,58,58,99,78,58,78,78,78, +78,212,78,246,246,78,99,58,246,246,246,246,246,246,71,12,99,58,58,99, +58,58,53,251,71,78,78,78,78,246,19,19,71,246,246,78,212,246,12,92, +12,12,12,12,92,12,12,71,218,118,19,101,244,239,65,223,244,11,53,112, +222,235,66,112,223,20,72,45,90,221,8,253,19,242,214,97,57,152,26,8, +26,188,57,187,139,186,8,8,8,8,121,121,8,8,26,4,44,131,94,67, +162,82,113,44,159,76,220,29,82,0,20,8,98,238,245,82,82,237,23,62, +54,112,20,223,237,49,22,245,237,11,71,49,12,92,12,12,12,12,71,78, +246,58,246,58,246,78,246,58,246,212,58,19,101,218,78,78,99,58,58,53, +101,71,58,246,246,246,78,71,92,58,246,246,212,246,78,58,58,78,78,58, +78,78,78,78,58,58,58,58,58,8,99,99,58,99,58,78,78,58,99,58, +78,78,58,246,78,58,71,92,218,246,246,246,103,246,12,92,92,58,58,58, +58,218,63,53,19,246,246,78,78,212,53,92,92,212,246,78,78,58,92,218, +12,12,92,92,92,12,12,71,11,118,101,101,22,116,242,223,237,11,8,30, +17,62,70,112,8,53,72,172,134,143,8,20,223,109,102,57,97,81,121,82, +252,114,35,157,165,26,253,8,8,46,182,4,26,26,8,8,113,160,190,35, +186,66,121,106,117,152,232,68,49,79,20,8,26,42,17,223,53,22,112,244, +54,244,8,82,30,118,30,245,30,11,99,12,12,92,123,12,12,12,71,78, +246,78,246,78,58,246,246,58,246,58,12,53,53,12,78,78,78,99,12,63, +63,92,78,78,246,246,78,229,229,12,246,246,246,212,78,71,71,58,78,78, +58,78,78,58,58,58,212,58,58,8,99,58,58,58,58,78,78,58,99,218, +99,58,246,78,78,58,12,92,12,78,246,246,246,218,92,92,19,71,58,58, +58,12,38,92,53,71,246,58,246,218,108,92,92,218,246,212,78,58,12,218, +12,12,12,92,12,92,12,71,71,118,82,8,103,116,242,82,244,11,82,30, +222,210,223,23,8,101,55,172,183,186,8,253,223,110,102,157,97,161,8,8, +127,67,190,140,189,26,8,8,69,127,120,5,52,26,26,8,121,9,84,187, +43,113,82,98,142,152,89,119,244,20,0,253,121,219,64,23,101,30,30,23, +54,244,82,101,30,112,112,72,237,71,30,12,12,92,118,12,12,12,71,58, +246,246,58,246,58,212,78,246,58,246,108,63,53,19,78,78,78,58,53,101, +53,108,78,246,246,246,108,79,20,53,246,246,246,78,99,92,92,12,99,78, +78,58,58,218,218,218,99,58,58,8,99,99,58,58,58,99,99,218,71,11, +99,99,78,246,212,71,218,71,92,71,246,246,246,71,92,92,19,19,58,58, +58,92,53,92,92,108,58,246,246,71,92,92,92,92,212,246,246,58,123,48, +12,12,12,92,92,12,12,12,99,118,19,101,237,116,65,49,30,112,82,244, +222,235,26,118,82,101,65,136,183,7,8,8,82,242,21,157,57,192,69,8, +26,7,191,157,190,60,9,8,26,52,84,131,60,4,121,8,26,113,67,94, +142,113,82,98,43,152,10,119,244,251,0,253,121,111,64,23,101,244,22,49, +62,62,82,101,112,23,112,103,30,71,11,12,12,118,12,12,118,12,71,78, +78,246,78,58,218,58,78,246,246,12,53,101,53,19,58,78,58,12,63,63, +53,63,218,246,246,71,79,20,63,101,218,246,246,218,12,19,108,12,99,58, +99,71,218,71,71,218,71,218,71,8,99,58,99,99,58,58,11,218,71,218, +71,71,218,58,58,99,218,99,71,92,218,78,246,92,92,12,223,53,71,58, +58,19,19,92,92,19,12,78,78,12,92,92,92,92,71,78,78,218,123,241, +48,12,12,92,49,12,118,12,71,49,223,101,11,116,65,66,112,11,82,112, +100,54,66,66,223,20,244,105,90,159,8,8,8,244,10,167,187,202,98,8, +121,47,192,169,190,35,195,188,188,195,57,84,106,47,8,8,8,122,195,140, +95,66,82,98,142,221,175,119,244,251,251,20,8,219,64,112,101,30,242,118, +23,62,19,20,11,118,112,22,11,11,99,12,12,12,12,71,12,118,71,58, +246,58,246,99,12,99,212,78,58,19,53,53,101,53,58,78,218,53,101,53, +53,63,218,246,246,63,0,101,19,53,12,78,58,12,108,92,19,108,92,71, +71,12,71,71,123,71,71,123,71,8,99,99,58,58,58,11,58,11,99,218, +99,11,99,99,218,99,218,99,71,12,12,99,99,92,92,92,12,19,53,71, +99,38,53,12,12,92,19,218,212,92,92,92,48,12,108,128,246,218,123,48, +128,123,12,12,12,12,12,118,71,71,223,8,112,41,55,49,49,244,223,49, +93,231,70,82,223,20,82,116,181,158,252,8,20,223,242,214,57,157,156,46, +8,66,26,147,44,198,86,196,86,198,44,52,4,8,8,8,46,60,97,194, +52,82,82,180,159,177,232,64,66,79,20,8,26,231,100,49,8,237,62,23, +62,244,82,82,30,223,11,237,112,11,11,12,12,71,12,12,118,12,71,218, +246,78,58,218,92,99,246,212,92,53,79,79,53,53,218,58,19,63,38,126, +53,101,92,58,19,251,63,223,19,19,92,71,12,223,92,223,223,92,19,92, +12,71,123,71,71,71,71,71,71,8,11,58,11,58,99,58,99,58,99,58, +58,218,218,218,99,218,11,99,99,71,92,92,12,49,92,71,99,12,53,53, +92,20,53,123,48,12,92,19,218,19,92,12,241,48,92,92,58,218,92,241, +128,212,71,12,118,12,12,71,71,112,223,19,82,55,116,112,49,244,223,19, +208,238,235,66,223,253,82,22,250,73,95,113,8,82,49,111,102,207,132,188, +252,69,8,121,162,4,47,52,127,4,4,26,26,8,8,46,186,86,169,95, +66,8,4,95,192,87,45,236,101,251,253,8,70,222,236,223,223,237,244,23, +54,244,82,82,237,118,11,244,71,11,99,71,118,12,12,12,12,12,12,58, +78,78,246,123,108,12,212,12,53,63,13,83,63,53,12,92,53,226,13,13, +53,53,53,226,75,63,12,71,92,19,19,92,92,92,19,12,12,12,92,12, +71,71,71,71,71,12,71,71,71,8,99,99,58,99,99,58,58,99,58,58, +11,218,71,71,11,218,99,99,58,218,12,19,92,92,92,99,78,58,92,101, +75,251,53,12,123,48,92,108,101,63,92,12,241,241,92,92,108,92,108,128, +212,246,58,12,12,12,49,12,12,118,12,49,19,237,116,22,49,118,244,82, +112,17,231,70,223,82,20,82,93,45,133,7,46,8,8,49,50,224,168,207, +142,60,127,46,8,26,8,8,8,8,8,8,121,26,47,192,166,169,7,113, +66,113,7,156,36,217,28,23,251,251,20,26,111,222,30,8,49,22,112,62, +242,112,101,112,30,49,244,11,112,11,99,71,12,12,118,12,12,12,71,246, +246,78,212,92,108,92,218,53,38,13,0,0,63,101,20,63,101,75,83,83, +63,101,229,79,126,92,58,78,12,19,92,92,19,92,12,71,71,118,71,71, +218,12,71,71,71,71,71,218,99,8,218,99,218,58,58,218,99,99,58,99, +58,58,99,99,218,99,218,99,58,58,99,92,92,92,19,58,78,78,99,108, +0,34,38,123,123,48,123,92,53,108,92,12,241,241,241,123,92,19,19,123, +241,212,246,99,12,71,12,71,12,71,118,223,82,118,245,100,112,49,30,118, +223,237,238,111,113,223,19,20,49,93,144,184,44,113,8,253,19,210,173,141, +168,57,196,142,60,52,122,182,113,113,122,3,60,159,130,86,43,122,26,223, +47,106,95,76,89,68,244,20,251,20,8,210,238,72,223,19,30,112,23,62, +244,223,20,118,112,112,244,118,11,99,99,218,71,218,71,12,12,71,58,58, +78,246,246,92,63,53,53,101,83,0,83,83,53,63,63,53,20,83,0,0, +53,53,79,0,226,78,58,78,12,108,92,19,92,71,58,58,99,71,71,123, +71,218,218,71,218,218,99,218,99,8,99,99,218,218,99,99,99,99,58,99, +99,58,99,11,71,99,99,58,58,58,58,71,92,92,19,78,78,58,78,218, +53,63,101,123,123,48,48,123,92,19,92,92,241,241,241,241,92,92,92,12, +241,212,78,78,123,118,12,12,12,12,112,92,49,223,30,247,65,49,23,112, +82,23,72,231,14,26,82,19,101,49,17,146,102,154,147,69,8,82,49,23, +249,104,158,39,206,169,86,130,202,142,202,114,39,117,76,88,4,66,66,113, +7,95,234,175,68,22,101,20,251,8,4,107,100,112,101,112,30,23,112,62, +49,101,49,244,118,112,112,118,11,78,99,99,99,58,71,12,92,99,246,78, +246,58,218,108,108,53,63,229,0,83,34,13,53,53,101,38,13,0,0,13, +53,101,63,101,99,78,58,78,71,19,19,92,71,58,99,58,11,218,218,71, +99,99,99,99,218,58,99,218,218,8,71,218,99,99,218,58,99,99,99,99, +99,58,99,58,99,218,11,58,58,99,58,58,71,92,92,58,78,78,78,78, +118,19,53,123,48,128,128,48,123,12,92,92,48,128,212,48,241,12,12,92, +241,128,246,246,246,71,12,12,12,71,71,118,49,223,49,208,116,22,49,23, +11,223,223,72,225,235,113,82,82,101,49,65,68,164,201,7,162,26,8,121, +66,223,23,216,14,36,177,152,154,152,80,255,98,66,66,223,66,4,32,152, +152,163,228,222,112,251,20,20,8,113,219,222,22,82,23,22,62,112,54,244, +101,82,112,112,23,118,112,11,11,78,58,58,246,99,71,71,99,58,246,212, +58,58,123,108,108,53,20,13,101,19,34,13,53,53,53,0,75,38,0,34, +63,53,53,71,58,78,58,78,11,92,92,71,58,58,58,58,99,218,11,99, +11,58,218,218,99,99,218,99,99,8,99,71,99,99,99,99,99,218,58,99, +218,58,99,99,99,58,58,78,58,99,58,58,58,71,12,78,78,78,78,78, +58,12,19,12,48,218,246,218,48,12,92,92,241,48,58,212,48,241,12,92, +48,241,212,58,212,212,123,118,12,71,118,118,12,223,49,118,55,239,244,223, +112,112,82,118,236,225,14,4,26,82,101,19,112,93,153,21,224,174,88,162, +26,26,121,82,66,66,66,66,66,66,26,82,66,26,113,127,32,44,51,87, +248,222,236,223,20,20,20,8,70,111,17,237,223,49,237,30,62,54,30,118, +253,49,112,118,23,118,118,11,99,58,58,58,212,99,71,218,246,78,78,58, +58,58,108,108,63,38,13,92,58,12,13,251,53,63,251,79,12,71,34,34, +251,53,19,58,78,78,78,58,58,71,71,58,99,99,58,99,58,11,58,99, +99,99,99,218,218,99,218,218,99,8,71,99,218,218,218,99,218,99,99,99, +99,71,58,99,99,99,99,58,58,99,58,58,78,58,99,78,58,78,58,78, +78,78,99,218,128,58,58,78,128,48,12,92,123,241,78,246,58,48,241,218, +12,128,212,212,58,58,212,218,71,12,71,12,118,12,223,49,11,243,55,244, +49,112,244,223,49,236,17,111,4,121,82,82,8,223,244,29,153,61,148,234, +152,32,147,52,4,4,113,26,113,26,98,98,147,255,7,193,24,163,217,238, +110,112,101,20,20,253,8,70,107,222,22,223,223,244,244,244,244,242,112,82, +223,118,23,23,49,118,71,11,58,58,58,246,246,58,99,78,58,212,212,78, +58,99,53,53,38,83,19,58,246,19,34,79,251,34,34,71,58,71,79,13, +83,63,218,58,58,99,58,78,58,99,78,58,99,99,99,58,58,99,99,58, +218,11,218,99,11,218,11,99,71,8,71,218,218,11,71,99,218,99,99,99, +99,218,11,99,58,58,58,58,11,58,99,218,58,58,78,78,78,78,58,58, +78,78,78,78,58,78,78,78,58,58,48,123,48,48,128,78,246,78,128,241, +241,241,128,212,58,58,58,58,218,12,118,71,71,112,118,223,49,11,245,55, +30,49,112,244,223,19,30,93,107,111,4,26,101,101,8,101,112,242,93,203, +6,170,21,74,51,51,104,24,234,76,24,104,76,124,232,56,225,18,30,223, +20,20,20,20,8,66,235,231,236,112,223,118,30,112,112,54,244,112,82,49, +112,23,118,118,12,11,99,99,246,58,58,58,78,58,246,246,78,78,212,78, +58,12,53,229,34,40,78,78,58,38,0,13,13,79,71,58,58,71,13,0, +38,71,58,99,58,99,58,99,78,58,58,99,99,99,71,99,58,99,218,99, +71,99,218,99,99,71,218,99,71,8,71,71,71,123,218,218,11,218,218,218, +218,99,218,218,99,99,99,99,58,99,99,99,99,99,58,78,78,58,58,99, +99,78,78,246,78,212,78,78,58,78,128,48,48,241,48,246,78,58,246,128, +128,128,128,128,212,78,212,78,58,218,71,71,12,12,118,118,49,49,112,208, +41,22,49,112,244,23,19,49,22,93,219,14,4,8,82,101,20,101,223,49, +30,65,18,29,17,203,228,230,56,96,91,225,225,236,242,112,49,82,20,20, +20,20,82,113,210,107,29,22,118,223,112,30,244,244,62,112,23,82,223,49, +118,118,49,49,118,71,99,246,58,58,212,246,246,78,212,58,246,246,78,58, +218,53,209,126,40,78,78,78,218,0,34,34,79,71,78,99,58,71,251,229, +12,58,99,99,99,58,58,58,58,99,99,99,99,218,99,58,99,99,99,218, +99,218,11,218,218,11,218,71,71,8,71,123,71,71,218,123,71,99,11,99, +218,11,99,71,218,99,58,99,99,58,218,218,99,99,58,58,58,58,99,58, +58,99,58,246,246,246,78,58,58,58,78,58,48,48,241,78,246,78,78,58, +58,241,241,241,212,58,246,78,246,58,218,71,71,71,118,118,118,49,49,112, +103,243,236,112,49,244,112,49,223,118,65,93,107,14,98,113,82,8,101,253, +101,20,101,82,82,223,118,118,49,49,49,82,82,101,101,20,20,253,253,121, +26,70,235,110,29,103,118,223,223,11,244,244,54,242,244,49,19,223,49,118, +118,49,12,71,11,99,212,246,78,78,78,78,212,246,78,58,78,212,78,58, +12,38,213,71,78,58,58,78,40,83,79,20,99,58,99,58,99,12,92,71, +78,58,99,99,99,99,99,99,99,99,218,218,99,218,218,99,218,218,11,218, +11,218,218,71,218,218,71,123,71,8,71,71,12,71,71,218,218,218,71,71, +218,218,218,218,71,218,218,99,99,218,99,99,99,99,99,99,58,99,58,99, +99,99,99,58,78,78,78,78,58,99,58,58,58,128,48,128,78,78,58,78, +212,212,212,241,128,58,246,246,58,246,58,218,218,118,71,71,118,12,118,49, +23,237,245,55,208,23,118,23,112,223,223,118,244,236,18,110,14,210,4,66, +121,8,82,20,82,101,101,251,20,20,20,101,8,20,8,8,26,26,210,235, +109,110,65,30,118,223,49,244,244,244,244,242,65,30,223,82,49,118,118,49, +92,49,118,71,11,78,246,78,58,246,212,246,78,78,246,78,246,78,212,218, +53,92,99,78,58,58,58,246,53,0,53,99,99,58,99,58,99,71,218,58, +99,58,99,218,58,99,58,78,99,99,11,99,71,99,99,218,99,99,218,71, +123,218,71,218,12,71,71,71,71,8,71,71,71,71,71,118,71,71,218,99, +71,71,71,123,71,71,218,99,99,218,218,71,11,218,99,99,58,99,58,99, +99,99,218,58,58,78,78,78,58,99,99,58,58,58,58,128,246,78,58,58, +58,58,246,128,128,58,212,246,78,78,78,58,58,218,71,71,11,118,118,49, +12,23,11,103,243,72,237,23,23,112,23,223,19,223,112,22,109,18,29,111, +111,210,210,70,4,26,26,26,26,26,26,4,4,70,98,235,2,18,29,65, +54,23,223,49,23,244,244,112,244,54,22,244,118,82,223,223,118,92,49,49, +223,71,11,99,99,78,246,58,246,78,58,212,78,78,58,58,246,78,58,218, +71,78,58,58,99,58,58,99,19,77,58,58,58,218,99,58,58,58,58,58, +218,99,11,218,58,99,218,58,218,218,71,218,218,71,99,71,218,71,71,218, +71,123,71,71,71,71,71,71,12,8,118,118,71,71,118,71,71,71,118,12, +71,123,71,71,71,71,71,71,218,99,99,99,218,218,71,218,99,99,58,99, +99,218,99,218,58,58,246,78,78,99,99,99,99,58,246,78,58,246,58,58, +58,58,58,78,78,58,58,58,246,212,99,58,58,58,218,99,71,118,11,118, +49,49,49,23,11,208,55,245,22,112,23,23,23,23,49,49,49,223,112,30, +22,236,18,18,18,29,18,18,18,18,107,236,29,236,236,22,30,23,223,223, +223,118,118,112,244,112,244,242,242,30,23,223,82,223,49,49,49,223,49,12, +71,71,99,58,246,212,58,58,58,78,78,78,58,58,58,58,78,212,246,78, +78,58,58,11,99,58,78,78,99,58,58,99,218,99,58,99,58,58,58,218, +99,71,218,99,218,58,99,218,218,71,218,123,71,99,71,218,71,71,71,12, +71,71,12,12,12,12,12,12,12,8,12,12,12,12,12,12,118,118,71,71, +71,218,71,123,71,71,71,71,123,71,218,11,218,71,218,123,218,99,218,58, +99,99,11,218,71,99,99,58,78,58,99,99,71,99,58,78,246,246,246,58, +58,218,58,99,78,78,246,78,78,246,58,58,58,212,58,58,99,71,71,118, +71,118,118,23,49,112,112,103,72,72,65,244,112,23,118,118,70,223,223,223, +223,49,118,23,118,112,112,244,112,112,23,23,23,49,49,223,223,49,23,118, +244,244,112,62,244,109,22,30,49,223,223,82,49,223,49,223,223,118,118,71, +99,99,99,78,78,246,58,58,78,78,58,58,58,99,78,246,78,78,78,78, +99,99,99,58,99,58,78,78,58,99,99,11,218,99,99,58,58,11,99,218, +218,218,71,99,218,218,11,218,123,71,218,71,71,218,71,71,123,71,118,12, +71,12,12,12,12,12,12,12,12,8,12,12,12,12,12,12,71,71,71,118, +71,118,71,71,118,12,71,71,71,71,99,218,123,71,218,71,218,71,99,99, +99,218,218,71,218,218,99,58,58,58,58,218,99,218,218,99,58,99,78,58, +58,99,99,99,58,58,78,246,246,78,78,78,58,99,58,58,99,58,99,71, +11,71,12,23,118,118,118,23,112,30,103,208,208,65,242,112,118,23,23,118, +118,118,49,112,23,112,11,112,112,112,118,49,49,49,49,112,23,23,112,244, +244,22,22,22,242,112,49,223,223,66,223,49,223,49,223,49,12,71,71,99, +99,58,212,212,246,58,78,78,58,58,99,99,99,58,78,78,78,78,58,58, +99,99,99,58,58,58,58,58,99,218,71,218,99,99,218,58,99,99,71,218, +71,71,218,99,71,99,123,71,118,118,123,71,71,123,71,71,12,12,118,12, +12,12,12,12,12,12,71,12,71,8,12,92,12,92,71,12,118,118,12,12, +118,71,71,12,71,71,118,12,12,71,118,218,71,71,71,12,71,12,218,218, +99,99,218,218,71,71,71,218,99,99,99,99,71,71,218,71,99,58,58,58, +58,58,99,11,99,99,99,58,246,78,246,78,58,99,99,99,58,58,99,99, +99,11,71,112,112,118,118,92,118,23,118,112,30,237,103,65,65,22,30,54, +244,244,23,112,244,112,244,112,244,23,244,23,112,62,244,244,30,242,22,242, +22,30,23,49,49,19,82,223,223,49,49,49,223,49,12,11,11,218,99,58, +58,78,78,78,246,78,78,99,99,58,99,58,58,78,78,78,58,99,218,218, +71,99,99,99,58,99,58,99,71,123,71,218,99,99,218,99,218,71,12,71, +71,218,71,71,218,71,71,71,71,71,12,71,71,71,118,12,12,12,71,71, +12,12,12,12,118,12,12,92,12,8,12,12,71,12,12,12,12,12,71,12, +118,12,12,12,118,12,71,12,12,71,71,71,71,123,71,12,12,71,71,218, +218,218,11,71,123,71,71,218,71,99,99,58,99,99,71,218,218,99,218,58, +58,58,58,99,218,71,99,218,58,58,58,246,212,58,58,99,99,58,99,58, +58,58,58,218,71,71,112,71,118,118,49,23,118,118,49,112,112,30,237,22, +22,22,103,22,22,22,22,22,30,242,22,22,22,103,22,22,30,112,112,23, +49,49,49,82,223,66,49,49,49,49,223,12,118,71,218,99,99,58,99,58, +78,246,78,246,58,58,99,99,218,218,99,99,99,58,58,58,99,218,71,218, +99,99,58,58,58,99,218,123,71,71,218,218,99,99,99,123,71,71,71,92, +71,71,218,218,71,12,12,12,118,71,12,118,71,71,71,12,12,12,12,12, +12,12,118,118,12,12,12,12,12,8,92,92,92,12,12,12,12,12,12,12, +92,12,12,12,71,12,118,12,12,12,12,12,71,71,71,12,12,71,118,71, +71,123,71,71,71,118,71,71,71,123,71,218,218,99,218,71,12,71,71,218, +218,58,58,99,58,71,71,218,218,218,99,58,58,58,58,58,99,99,99,218, +218,99,58,58,99,99,99,11,11,11,23,112,118,112,49,118,118,118,23,118, +49,118,23,112,112,112,112,244,112,112,118,112,118,49,49,223,49,223,223,49, +223,223,49,49,223,49,223,223,118,118,71,11,218,99,218,99,218,78,58,58, +58,58,58,218,218,218,218,218,58,99,58,58,58,58,218,99,71,71,123,71, +218,99,58,99,99,71,71,12,12,71,71,71,218,218,218,71,118,71,71,12, +123,71,12,71,71,12,12,12,118,71,12,12,12,118,118,12,71,118,12,118, +12,12,12,12,12,92,12,12,92,8,92,92,12,12,92,12,92,12,12,12, +12,12,118,12,12,12,12,12,12,12,118,12,12,71,118,71,12,12,71,118, +71,71,71,123,218,118,12,71,71,71,71,99,99,218,218,71,71,71,71,71, +99,218,99,58,99,218,218,71,71,71,218,71,58,99,58,58,99,58,218,99, +99,218,99,99,58,58,58,99,58,99,218,11,71,112,11,112,118,23,118,23, +49,118,118,92,49,92,49,92,49,92,49,223,223,49,223,49,49,49,49,82, +49,49,49,223,118,118,71,71,11,71,99,218,218,99,58,58,58,58,58,58, +58,218,218,218,71,218,218,99,99,99,99,58,218,218,71,123,71,71,218,11, +99,99,218,218,71,71,12,71,12,218,218,218,71,218,118,12,71,118,71,71, +71,71,71,71,118,71,12,12,12,71,12,12,12,12,12,12,12,49,12,12, +12,92,12,49,12,92,12,12,92,8,92,92,92,92,92,12,92,12,12,92, +12,92,12,92,12,71,71,12,12,12,12,71,12,118,71,118,71,118,12,12, +12,12,71,71,218,71,71,118,118,12,12,118,71,218,71,218,123,12,12,12, +12,71,71,99,99,99,218,71,71,71,71,123,71,218,218,58,99,99,58,218, +99,218,218,11,99,218,99,218,218,58,58,58,99,218,71,11,71,71,118,11, +112,71,112,118,112,12,118,118,118,118,118,118,118,118,118,118,223,223,49,49, +118,118,118,71,71,71,218,71,218,71,99,99,99,218,58,58,58,218,218,218, +218,71,71,218,123,71,218,99,58,218,218,99,71,118,12,71,71,71,218,218, +218,99,71,118,12,12,12,71,71,123,71,71,71,12,118,12,92,71,118,71, +12,12,71,12,12,92,12,12,12,118,12,12,12,12,12,92,12,12,12,92, +71,92,12,92,92,92,92,92,12,8,92,92,92,92,92,92,92,92,92,12, +92,12,92,12,92,92,12,118,92,12,12,92,92,12,12,12,12,12,12,12, +12,12,71,118,12,118,71,71,12,12,12,12,118,71,218,71,218,71,118,12, +12,71,12,71,218,71,99,218,123,71,71,12,71,118,71,71,99,218,218,99, +218,99,218,218,218,71,123,71,218,218,218,218,99,99,99,58,99,99,99,218, +99,71,71,71,11,71,11,11,11,11,11,11,11,11,71,118,12,118,218,218, +71,218,71,71,218,71,99,71,99,99,99,58,218,99,218,218,71,71,71,71, +71,71,123,71,11,99,99,99,218,218,71,71,12,12,12,71,123,218,71,218, +71,118,71,12,118,12,12,71,71,218,118,12,12,12,92,12,71,118,71,71, +12,71,92,12,92,12,12,12,118,12,12,92,92,12,92,12,92,92,92,92, +92,92,92,92,12,92,92,92,92,8,92,92,92,12,92,92,92,92,92,92, +92,92,92,12,92,92,12,12,92,92,92,12,92,92,12,12,118,12,12,92, +92,12,12,12,71,71,71,118,12,118,12,12,12,71,12,71,71,71,71,12, +12,12,118,12,12,118,218,71,71,71,12,71,71,71,12,12,71,71,71,11, +218,99,218,218,218,218,71,71,71,71,71,71,71,71,218,218,218,218,99,218, +218,218,99,218,99,218,218,218,218,218,218,218,218,99,218,11,218,71,71,71, +71,123,71,123,71,218,99,218,218,11,218,99,71,71,71,71,71,71,71,92, +71,71,71,123,71,218,71,71,71,118,12,12,12,12,71,71,71,218,71,71, +12,12,12,12,12,12,12,71,71,71,12,12,12,12,12,12,12,12,118,12, +12,92,92,92,12,92,12,71,12,92,92,12,92,92,92,92,92,12,92,92, +92,92,92,92,92,92,92,92,92,8,92,19,92,92,92,92,92,223,92,92, +92,92,92,92,92,92,92,92,92,92,92,92,12,92,12,92,12,118,12,12, +12,92,92,12,92,12,12,12,71,12,49,12,92,92,12,12,71,12,12,12, +12,71,12,12,12,12,71,12,71,71,218,218,71,118,12,12,12,71,12,12, +71,123,71,71,99,71,71,123,71,123,71,123,71,71,71,71,71,71,71,71, +71,218,218,218,71,71,218,71,218,71,218,71,71,123,71,123,71,123,71,123, +218,71,218,218,218,218,71,71,71,71,71,12,12,12,12,12,12,12,71,71, +71,123,218,218,71,71,12,12,12,71,12,12,12,12,71,71,71,12,118,12, +12,92,12,12,12,12,12,12,71,12,92,12,92,12,12,118,12,12,12,92, +92,92,92,92,92,12,92,92,12,92,92,92,92,19,12,92,92,92,92,92, +12,92,92,92,92,92,92,92,92,8,19,108,19,108,12,19,92,92,92,92, +92,92,92,92,92,19,92,92,92,92,92,92,92,92,92,92,92,92,12,92, +92,92,92,92,92,92,12,12,12,12,71,12,92,92,92,92,12,92,118,12, +12,12,12,12,92,12,12,12,71,12,71,71,71,12,12,12,12,12,12,92, +112,118,71,12,71,71,71,218,71,71,71,71,71,71,12,12,12,12,12,12, +12,118,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71, +71,71,71,71,71,71,71,71,118,71,12,71,12,12,12,12,12,71,71,123, +71,71,71,92,12,12,12,12,92,92,71,12,12,12,12,71,12,12,92,12, +92,92,12,118,12,12,118,12,12,92,92,92,92,12,12,12,12,92,92,92, +92,12,92,12,92,12,92,92,92,92,92,92,92,92,92,92,92,92,92,92, +92,92,92,92,12,19,19,108,92,8,92,92,19,92,108,92,19,92,92,92, +92,108,92,92,92,12,92,92,12,92,92,92,92,92,92,92,92,92,92,12, +12,92,92,92,92,223,12,92,12,12,12,12,12,92,92,12,92,12,12,12, +12,12,12,12,49,12,92,92,92,92,12,12,71,12,12,12,12,12,12,12, +92,92,118,92,12,12,118,12,12,12,12,12,12,71,12,12,12,12,12,12, +12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, +12,12,118,118,12,118,12,12,12,12,12,12,12,12,12,12,12,12,71,12, +12,12,71,92,12,92,92,49,12,12,12,12,118,12,12,118,92,12,92,92, +12,12,12,12,123,12,92,92,92,92,92,92,12,92,12,92,92,92,92,92, +92,92,92,92,92,92,92,92,92,92,92,92,12,92,92,92,19,92,92,108, +92,19,92,108,108,92,108,92,108,8,19,108,19,92,19,108,108,108,92,19, +92,92,19,92,108,108,92,108,108,92,92,92,92,92,92,19,92,92,92,92, +92,92,92,92,92,92,92,92,92,92,92,92,12,92,12,92,92,92,92,92, +92,12,12,12,12,12,12,92,92,92,92,92,92,12,12,12,12,12,118,12, +12,12,12,92,12,12,12,12,71,12,12,12,12,71,71,12,12,71,118,118, +12,12,12,12,12,118,12,12,12,92,12,12,12,12,12,71,12,12,118,12, +12,71,12,12,12,12,12,92,118,118,12,12,12,12,71,12,12,12,49,12, +92,12,92,92,92,12,92,12,12,12,12,12,92,92,92,92,92,92,92,92, +12,12,71,92,92,92,12,92,223,92,92,92,12,92,92,92,92,92,12,19, +92,92,92,92,92,92,108,92,108,19,92,108,108,108,92,92,19,108,92,108, +19,92,19,92,108,92,108,19,19,8,19,108,19,108,108,19,92,19,108,19, +19,108,108,19,19,92,108,92,92,108,19,12,108,108,92,19,108,108,92,19, +92,92,92,92,92,92,108,19,92,92,92,92,12,92,92,92,92,92,92,92, +92,92,92,12,12,118,123,92,12,12,92,92,92,92,92,92,12,12,12,12, +12,92,12,12,92,12,92,92,92,92,92,92,12,12,12,12,12,12,12,71, +71,12,12,12,12,12,12,12,71,12,12,12,12,12,12,92,12,12,92,12, +92,12,12,49,12,92,12,12,12,12,12,71,12,12,12,12,92,12,92,12, +92,92,92,92,92,12,12,12,12,92,12,12,92,92,92,92,92,92,12,12, +12,92,92,92,92,19,108,92,92,92,92,92,92,92,92,19,92,108,108,92, +92,92,92,19,108,92,19,108,92,108,108,92,19,92,108,19,108,92,108,92, +19,108,108,92,108,108,19,92,108,8,19,19,19,19,19,108,19,19,108,92, +19,19,108,92,19,19,108,19,108,92,108,19,92,19,92,92,92,19,92,92, +92,92,92,92,92,92,19,108,92,19,19,92,92,92,92,92,92,92,223,92, +223,92,92,92,92,92,92,92,92,92,92,92,92,223,92,92,92,12,92,12, +12,12,12,12,92,12,12,92,12,92,92,92,92,92,92,92,92,92,92,92, +92,92,12,92,49,92,12,92,92,12,12,92,12,92,12,92,12,12,92,12, +12,12,12,12,12,12,12,92,92,92,12,92,92,92,92,92,92,92,92,92, +92,92,12,12,12,12,92,92,92,92,92,92,92,92,92,92,92,92,92,92, +92,92,12,19,92,92,108,12,92,92,92,12,19,92,92,108,92,19,19,92, +92,92,92,92,108,19,92,19,19,92,92,108,108,92,108,92,19,19,19,108, +19,19,19,19,19,19,108,19,19,8,19,53,19,53,19,53,19,53,19,108, +19,108,19,108,108,108,19,108,19,108,19,108,108,108,108,19,108,19,108,19, +19,92,108,19,19,12,108,92,108,92,108,19,108,92,92,92,92,92,92,19, +92,19,108,92,19,92,92,92,92,92,92,92,92,92,92,92,108,108,19,92, +92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, +92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, +92,92,92,92,12,92,92,92,12,92,19,92,92,92,92,92,92,92,92,92, +92,92,92,92,92,92,92,92,92,108,19,92,92,223,92,92,92,92,92,92, +19,108,108,108,108,19,92,92,92,92,108,108,108,108,108,92,108,92,108,19, +92,19,108,108,19,108,108,108,108,108,19,19,19,19,19,19,108,108,53,19, +108,19,108,53,19,53,19,53,19,8,19,19,19,19,19,19,19,19,19,19, +19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,108,19,108,19, +19,19,19,19,108,19,108,19,108,19,108,19,19,19,19,108,19,92,92,92, +19,19,108,19,108,19,19,92,92,92,92,92,92,92,92,19,19,108,19,108, +19,92,19,92,92,92,92,92,92,92,92,92,92,92,92,19,92,92,92,92, +92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, +92,92,92,19,19,19,92,19,19,92,19,19,108,92,92,92,19,92,92,92, +92,92,92,92,92,19,19,19,19,108,19,108,92,92,92,92,92,92,19,19, +92,19,223,19,108,19,108,92,19,19,19,19,19,19,108,19,108,19,108,19, +19,19,19,19,19,19,19,19,19,108,19,108,19,108,19,19,19,19,19,19, +19,19,19,19,19,19,19,19,19,8}; diff --git a/plug-ins/FractalExplorer/pix_data.h b/plug-ins/FractalExplorer/pix_data.h new file mode 100644 index 0000000000..4b459e0fa0 --- /dev/null +++ b/plug-ins/FractalExplorer/pix_data.h @@ -0,0 +1,154 @@ +/* XPM */ +static char * mini_cross_xpm[] = { +"16 14 4 1", +" c None s None", +". c red", +"X c gray50", +"o c black", +" ", +" . ", +" ..X ... ", +" ..X ..... ", +" .......oo ", +" .....o ", +" ....o ", +" ...... ", +" ..o ... ", +" ..o ... ", +" .o ..X ", +" .o .o ", +" o o ", +" "}; + +/* XPM */ +static char * greendot_xpm[] = { +"18 18 21 1", +" c None", +". c #FFFFFBEEFFFF", +"X c #F7DEF7DEF7DE", +"o c #F7DEF3CEF7DE", +"O c #E79DE79DEFBE", +"+ c #D75CDB6CDF7D", +"@ c #CF3CD75CDF7D", +"# c #D75CDF7DE79D", +"$ c #B6DAC30BC71B", +"% c #9E79AEBAB6DA", +"& c #8E38A289AEBA", +"* c #EFBEF3CEF7DE", +"= c #F7DEFBEEFFFF", +"- c #86179658A699", +"; c #514479E78E38", +": c #492471C68617", +"> c #DF7DE38DE79D", +", c #9658AAAAB6DA", +"< c #30C25D7571C6", +"1 c #2081596569A6", +"2 c #1861555569A6", +" ", +" ", +" ", +" ", +" .XXX. ", +" .oO+@+Oo. ", +" .o#$%&%$#*. ", +" =O$-;:;-$>= ", +" X+,;<1<;,+X ", +" o@&:121:&@o ", +" X+,;<1<;,+X ", +" =O$-;:;-$>= ", +" .*#$,&,$#*. ", +" .oO+@+Oo. ", +" .=XoX=. ", +" ", +" ", +" "}; + + +/* XPM */ +static char * bluedot_xpm[] = { +"18 18 20 1", +" c None", +". c #FFFFFBEEFFFF", +"X c #F7DEF7DEF7DE", +"o c #F7DEF3CEF7DE", +"O c #E79DE38DEFBE", +"+ c #D75CD75CDF7D", +"@ c #D75CCF3CDF7D", +"# c #DF7DD75CE79D", +"$ c #BEFBB6DACF3C", +"% c #A6999A69B6DA", +"& c #96588E38AEBA", +"* c #F7DEEFBEF7DE", +"= c #F7DEF7DEFFFF", +"- c #8E388207A699", +"; c #618559658E38", +": c #596549248617", +"> c #E79DE38DE79D", +", c #410330C271C6", +"< c #38E3249271C6", +"1 c #30C2186169A6", +" ", +" ", +" ", +" ", +" .XoX. ", +" .oO+@+Oo. ", +" .o#$%&%$#*. ", +" =O$-;:;-$>= ", +" o+%;,<,;%+o ", +" o@&:<1<:&@o ", +" o+%;,<,;%+o ", +" =O$-;:;-$>= ", +" .*#$%&%$#*. ", +" .oO+@+Oo. ", +" .=ooo=. ", +" ", +" ", +" "}; + + +/* XPM */ +static char * Floppy6_xpm[] = { +"18 18 24 1", +" c None", +". c #861782078617", +"X c #5965596571C6", +"o c #618565955965", +"O c #596559659E79", +"+ c #0000000079E7", +"@ c #0820082071C6", +"# c #9E799E790000", +"$ c #FFFFFFFF0000", +"% c #186118614103", +"& c #965896589E79", +"* c #9E799E795965", +"= c #000000006185", +"- c #9E799E799E79", +"; c #FFFFFFFFFFFF", +": c #000000000000", +"> c #71C675D69658", +", c #BEFBBEFBBEFB", +"< c #B6DAB2CABEFB", +"1 c #1040145171C6", +"2 c #28A228A28617", +"3 c #79E77DF78E38", +"4 c #A699A289A699", +"5 c #38E33CF379E7", +" ", +" .XXoooooooooXO ", +" +@#$$$$$$$$$%+O ", +" &++*$$$$$$$$$%+O ", +" &+=-;;;;;;;;;%+O ", +" &==-;::;:;:;;%+O ", +" &++-;;;;;;;;;%+O ", +" &++-;:;:::;:;%+O ", +" &++-;;;;;;;;;%+O ", +" &+=>,,<,,,,,,1+O ", +" &++==========++O ", +" &+++22222222+++O ", +" &++;11>-333.+++O ", +" &++;++>43333+++O ", +" &++5++>4...3=++O ", +" 31+++======+++O ", +" &&&&&&&&&&&& ", +" "}; diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am index 42ede45e60..69c199963e 100644 --- a/plug-ins/Makefile.am +++ b/plug-ins/Makefile.am @@ -19,6 +19,7 @@ SUBDIRS = \ AlienMap \ CEL \ CML_explorer \ + FractalExplorer \ Lighting \ MapObject \ align_layers \ diff --git a/unitrc b/unitrc index 7e9ed1b51b..a8c52beb03 100644 --- a/unitrc +++ b/unitrc @@ -37,19 +37,18 @@ (singular "yard") (plural "yards")) -(unit-info "typorg. points" +(unit-info "typogr. points" (factor 72.270000) (digits 0) (symbol "tpt") (abbreviation "tpt") (singular "typogr. point") - (plural "typorg. points")) + (plural "typogr. points")) -(unit-info "typorg. picas" +(unit-info "typogr. picas" (factor 6.022500) (digits 1) (symbol "tpc") (abbreviation "tpc") (singular "typogr. pica") - (plural "typorg. picas")) - + (plural "typogr. picas")) diff --git a/user_install b/user_install index e67970810c..4134b22045 100755 --- a/user_install +++ b/user_install @@ -34,14 +34,16 @@ echo "mkdir $2/plug-ins" mkdir $2/plug-ins echo "mkdir $2/modules" mkdir $2/modules -echo "mkdir $2/gfig" -mkdir $2/gfig -echo "mkdir $2/tmp" -mkdir $2/tmp echo "mkdir $2/scripts" mkdir $2/scripts +echo "mkdir $2/tmp" +mkdir $2/tmp +echo "mkdir $2/gfig" +mkdir $2/gfig echo "mkdir $2/gflares" mkdir $2/gflares +echo "mkdir $2/fractalexplorer" +mkdir $2/fractalexplorer echo "cp $1/palettes/* $2/palettes" cp $1/palettes/* $2/palettes diff --git a/user_install.bat b/user_install.bat index c37957a899..f1791c625f 100644 --- a/user_install.bat +++ b/user_install.bat @@ -10,8 +10,9 @@ mkdir %2\palettes mkdir %2\patterns mkdir %2\plug-ins mkdir %2\modules -mkdir %2\gfig mkdir %2\scripts +mkdir %2\gfig mkdir %2\gflares +mkdir %2\fractalexplorer pause