gimp/libgimp/gimpunit_pdb.c

272 lines
6.3 KiB
C
Raw Normal View History

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
*
* gimpunit_pdb.c
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
*
* This library is free software; you can redistribute it and/or
1999-11-18 05:13:50 +08:00
* modify it under the terms of the GNU Lesser General Public
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
*
1999-11-18 05:13:50 +08:00
* You should have received a copy of the GNU Lesser General Public
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
#include "gimp.h"
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
gint
_gimp_unit_get_number_of_units (void)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
GParam *return_vals;
gint nreturn_vals;
gint num_units = GIMP_UNIT_END;
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_units",
&nreturn_vals,
PARAM_END);
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
if (return_vals[0].data.d_status == STATUS_SUCCESS)
num_units = return_vals[1].data.d_int32;
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return num_units;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
}
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
gint
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
_gimp_unit_get_number_of_built_in_units (void)
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gint num_units = GIMP_UNIT_END;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_built_in_units",
&nreturn_vals,
PARAM_END);
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
if (return_vals[0].data.d_status == STATUS_SUCCESS)
num_units = return_vals[1].data.d_int32;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return num_units;
}
GimpUnit
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
_gimp_unit_new (gchar *identifier,
gdouble factor,
gint digits,
gchar *symbol,
gchar *abbreviation,
gchar *singular,
gchar *plural)
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
GimpUnit unit_ID = GIMP_UNIT_INCH;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_new",
&nreturn_vals,
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
PARAM_STRING, identifier,
PARAM_FLOAT, factor,
PARAM_INT32, digits,
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
PARAM_STRING, symbol,
PARAM_STRING, abbreviation,
PARAM_STRING, singular,
PARAM_STRING, plural,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
unit_ID = return_vals[1].data.d_unit;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return unit_ID;
}
gboolean
_gimp_unit_get_deletion_flag (GimpUnit unit_ID)
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gboolean deletion_flag = TRUE;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_deletion_flag",
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
deletion_flag = return_vals[1].data.d_int32;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return deletion_flag;
}
void
_gimp_unit_set_deletion_flag (GimpUnit unit_ID,
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
gboolean deletion_flag)
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_set_deletion_flag",
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_INT32, deletion_flag,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gchar *
_gimp_unit_get_identifier (GimpUnit unit_ID)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gchar *identifier = NULL;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_identifier",
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
identifier = g_strdup (return_vals[1].data.d_string);
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return identifier;
}
gdouble
_gimp_unit_get_factor (GimpUnit unit_ID)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gdouble factor = 1.0;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_factor",
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
factor = return_vals[1].data.d_float;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return factor;
}
gint
_gimp_unit_get_digits (GimpUnit unit_ID)
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gint digits = 2;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_digits",
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
digits = return_vals[1].data.d_int32;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return digits;
}
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gchar *
_gimp_unit_get_symbol (GimpUnit unit_ID)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gchar *symbol = NULL;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_symbol",
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
symbol = g_strdup (return_vals[1].data.d_string);
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return symbol;
}
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gchar *
_gimp_unit_get_abbreviation (GimpUnit unit_ID)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gchar *abbreviation = NULL;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_abbreviation",
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
abbreviation = g_strdup (return_vals[1].data.d_string);
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gimp_destroy_params (return_vals, nreturn_vals);
return abbreviation;
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
}
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gchar *
_gimp_unit_get_singular (GimpUnit unit_ID)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gchar *singular = NULL;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_singular",
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
if (return_vals[0].data.d_status == STATUS_SUCCESS)
singular = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return singular;
}
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
gchar *
_gimp_unit_get_plural (GimpUnit unit_ID)
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
{
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
GParam *return_vals;
gint nreturn_vals;
gchar *plural = NULL;
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
return_vals = gimp_run_procedure ("gimp_unit_get_plural",
&nreturn_vals,
PARAM_INT32, unit_ID,
This implements the rest of the unit system (unitrc loading and saving and 1999-03-16 Michael Natterer <mitschel@cs.tu-berlin.de> This implements the rest of the unit system (unitrc loading and saving and full PDB interface) * Makefile.am * gimp.1 * user_install * user_install.bat * unitrc: new file (default unit database) and some documentation * app/Makefile.am * app/gimpunit.c * app/gimpunit_cmds.h * app/unitrc.h: new files enabling the unit database and PDB access to the unit system * app/app_procs.c: parse and save unitrc * app/gimprc.[ch]: enable unit parsing. New function init_parse_buffers() to enable unitrc to be loaded before gimprc * app/gimage_cmds.[ch]: new PDB procedures which set/return an image's unit * app/install.c: mention unitrc installation * app/xcf.c: new xcf property for user defined units. An image's unit is saved as either an integer ID (built in units) or as a full unit definition without any ID * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to libgimp.a * libgimp/gimp.h * libgimp/gimpimage.c: get/set an image's unit with PDB calls * libgimp/gimpunit.h: this file is now the header for both app/gimpunit.c and libgimp/gimpunit.c * libgimp/gimpunit.c: does the unit calls as PDB calls now * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a unit selection dialog * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and minor bugfixes * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is "cm", save "cm" if image unit is metric
1999-03-17 04:14:07 +08:00
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
plural = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return plural;
}