2000-02-26 11:41:06 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2000-06-02 01:34:56 +08:00
|
|
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
1999-03-17 04:14:07 +08:00
|
|
|
*
|
2000-05-31 07:38:46 +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
|
2000-06-02 01:34:56 +08:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
|
|
|
|
2002-05-14 07:30:23 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
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
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_number_of_units:
|
|
|
|
*
|
|
|
|
* Returns the number of units.
|
|
|
|
*
|
|
|
|
* This procedure returns the number of defined units.
|
|
|
|
*
|
|
|
|
* Returns: The number of units.
|
|
|
|
*/
|
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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-05-31 21:24:14 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
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
|
|
|
|
2000-05-31 21:24:14 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_units",
|
|
|
|
&nreturn_vals,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_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
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-02 01:34:56 +08:00
|
|
|
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
|
|
|
|
2000-05-31 21:24:14 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return num_units;
|
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
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_number_of_built_in_units:
|
|
|
|
*
|
|
|
|
* Returns the number of built-in units.
|
|
|
|
*
|
|
|
|
* This procedure returns the number of defined units built-in to the
|
|
|
|
* GIMP.
|
|
|
|
*
|
|
|
|
* Returns: The number of built-in units.
|
|
|
|
*/
|
1999-03-03 20:35:12 +08:00
|
|
|
gint
|
2000-05-31 21:24:14 +08:00
|
|
|
_gimp_unit_get_number_of_built_in_units (void)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
gint num_units = GIMP_UNIT_END;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-05-31 21:24:14 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_built_in_units",
|
2000-08-22 05:23:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-02 01:34:56 +08:00
|
|
|
num_units = return_vals[1].data.d_int32;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return num_units;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_new:
|
|
|
|
* @identifier: The new unit's identifier.
|
|
|
|
* @factor: The new unit's factor.
|
|
|
|
* @digits: The new unit's digits.
|
|
|
|
* @symbol: The new unit's symbol.
|
|
|
|
* @abbreviation: The new unit's abbreviation.
|
|
|
|
* @singular: The new unit's singular form.
|
|
|
|
* @plural: The new unit's plural form.
|
|
|
|
*
|
|
|
|
* Creates a new unit and returns it's integer ID.
|
|
|
|
*
|
|
|
|
* This procedure creates a new unit and returns it's integer ID. Note
|
|
|
|
* that the new unit will have it's deletion flag set to TRUE, so you
|
|
|
|
* will have to set it to FALSE with gimp_unit_set_deletion_flag to
|
|
|
|
* make it persistent.
|
|
|
|
*
|
|
|
|
* Returns: The new unit's ID.
|
|
|
|
*/
|
2000-02-08 04:35:13 +08:00
|
|
|
GimpUnit
|
2003-07-02 09:20:08 +08:00
|
|
|
_gimp_unit_new (const gchar *identifier,
|
|
|
|
gdouble factor,
|
|
|
|
gint digits,
|
|
|
|
const gchar *symbol,
|
|
|
|
const gchar *abbreviation,
|
|
|
|
const gchar *singular,
|
|
|
|
const gchar *plural)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-22 05:23:31 +08:00
|
|
|
GimpUnit unit_id = GIMP_UNIT_INCH;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_new",
|
|
|
|
&nreturn_vals,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_STRING, identifier,
|
|
|
|
GIMP_PDB_FLOAT, factor,
|
|
|
|
GIMP_PDB_INT32, digits,
|
|
|
|
GIMP_PDB_STRING, symbol,
|
|
|
|
GIMP_PDB_STRING, abbreviation,
|
|
|
|
GIMP_PDB_STRING, singular,
|
|
|
|
GIMP_PDB_STRING, plural,
|
|
|
|
GIMP_PDB_END);
|
|
|
|
|
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-08-22 05:23:31 +08:00
|
|
|
unit_id = return_vals[1].data.d_unit;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-08-22 05:23:31 +08:00
|
|
|
return unit_id;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_deletion_flag:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the deletion flag of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the deletion flag of the unit. If this value
|
|
|
|
* is TRUE the unit's definition will not be saved in the user's unitrc
|
|
|
|
* file on gimp exit.
|
|
|
|
*
|
|
|
|
* Returns: The unit's deletion flag.
|
|
|
|
*/
|
2000-02-08 04:35:13 +08:00
|
|
|
gboolean
|
2000-08-22 05:23:31 +08:00
|
|
|
_gimp_unit_get_deletion_flag (GimpUnit unit_id)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-22 05:23:31 +08:00
|
|
|
gboolean deletion_flag = FALSE;
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_deletion_flag",
|
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-02 01:34:56 +08:00
|
|
|
deletion_flag = return_vals[1].data.d_int32;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return deletion_flag;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_set_deletion_flag:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
* @deletion_flag: The new deletion flag of the unit.
|
|
|
|
*
|
|
|
|
* Sets the deletion flag of a unit.
|
|
|
|
*
|
|
|
|
* This procedure sets the unit's deletion flag. If the deletion flag
|
|
|
|
* of a unit is TRUE on gimp exit, this unit's definition will not be
|
|
|
|
* saved in the user's unitrc.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
|
|
|
*/
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean
|
2000-08-22 05:23:31 +08:00
|
|
|
_gimp_unit_set_deletion_flag (GimpUnit unit_id,
|
2000-05-31 21:24:14 +08:00
|
|
|
gboolean deletion_flag)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean success = TRUE;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_set_deletion_flag",
|
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_INT32, deletion_flag,
|
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-23 09:44:59 +08:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 09:44:59 +08:00
|
|
|
|
|
|
|
return success;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_identifier:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the textual identifier of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the textual identifier of the unit. For
|
|
|
|
* built-in units it will be the english singular form of the unit's
|
|
|
|
* name. For user-defined units this should equal to the singular form.
|
|
|
|
*
|
|
|
|
* Returns: The unit's textual identifier.
|
|
|
|
*/
|
2000-06-02 01:34:56 +08:00
|
|
|
gchar *
|
2000-08-22 05:23:31 +08:00
|
|
|
_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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
gchar *identifier = NULL;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_identifier",
|
1999-03-17 04:14:07 +08:00
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-02 01:34:56 +08:00
|
|
|
identifier = g_strdup (return_vals[1].data.d_string);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return identifier;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_factor:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the factor of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the unit's factor which indicates how many
|
|
|
|
* units make up an inch. Note that asking for the factor of \"pixels\"
|
|
|
|
* will produce an error.
|
|
|
|
*
|
|
|
|
* Returns: The unit's factor.
|
|
|
|
*/
|
2000-06-02 01:34:56 +08:00
|
|
|
gdouble
|
2000-08-22 05:23:31 +08:00
|
|
|
_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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-22 05:23:31 +08:00
|
|
|
gdouble factor = 0;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_factor",
|
1999-03-17 04:14:07 +08:00
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-02 01:34:56 +08:00
|
|
|
factor = return_vals[1].data.d_float;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return factor;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_digits:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the number of digits of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the number of digits you should provide in
|
|
|
|
* input or output functions to get approximately the same accuracy as
|
|
|
|
* with two digits and inches. Note that asking for the digits of
|
|
|
|
* \"pixels\" will produce an error.
|
|
|
|
*
|
|
|
|
* Returns: The unit's number of digits.
|
|
|
|
*/
|
2000-06-02 01:34:56 +08:00
|
|
|
gint
|
2000-08-22 05:23:31 +08:00
|
|
|
_gimp_unit_get_digits (GimpUnit unit_id)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-22 05:23:31 +08:00
|
|
|
gint digits = 0;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_digits",
|
1999-03-17 04:14:07 +08:00
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-02 01:34:56 +08:00
|
|
|
digits = return_vals[1].data.d_int32;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return digits;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_symbol:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the symbol of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the symbol of the unit (\"''\" for inches).
|
|
|
|
*
|
|
|
|
* Returns: The unit's symbol.
|
|
|
|
*/
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
2000-08-22 05:23:31 +08:00
|
|
|
_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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
gchar *symbol = NULL;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_symbol",
|
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
1999-03-17 04:14:07 +08:00
|
|
|
symbol = g_strdup (return_vals[1].data.d_string);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return symbol;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_abbreviation:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the abbreviation of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the abbreviation of the unit (\"in\" for
|
|
|
|
* inches).
|
|
|
|
*
|
|
|
|
* Returns: The unit's abbreviation.
|
|
|
|
*/
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
2000-08-22 05:23:31 +08:00
|
|
|
_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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
gchar *abbreviation = NULL;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_abbreviation",
|
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
1999-03-17 04:14:07 +08:00
|
|
|
abbreviation = g_strdup (return_vals[1].data.d_string);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_singular:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the singular form of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the singular form of the unit.
|
|
|
|
*
|
|
|
|
* Returns: The unit's singular form.
|
|
|
|
*/
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
2000-08-22 05:23:31 +08:00
|
|
|
_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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
gchar *singular = NULL;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_singular",
|
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
1999-03-17 04:14:07 +08:00
|
|
|
singular = g_strdup (return_vals[1].data.d_string);
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return singular;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* _gimp_unit_get_plural:
|
|
|
|
* @unit_id: The unit's integer ID.
|
|
|
|
*
|
|
|
|
* Returns the plural form of the unit.
|
|
|
|
*
|
|
|
|
* This procedure returns the plural form of the unit.
|
|
|
|
*
|
|
|
|
* Returns: The unit's plural form.
|
|
|
|
*/
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
2000-08-22 05:23:31 +08:00
|
|
|
_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
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-02-08 04:35:13 +08:00
|
|
|
gint nreturn_vals;
|
2000-06-02 01:34:56 +08:00
|
|
|
gchar *plural = NULL;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_plural",
|
|
|
|
&nreturn_vals,
|
2000-08-22 05:23:31 +08:00
|
|
|
GIMP_PDB_INT32, unit_id,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
1999-03-17 04:14:07 +08:00
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
1999-03-17 04:14:07 +08:00
|
|
|
plural = g_strdup (return_vals[1].data.d_string);
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
2000-06-02 01:34:56 +08:00
|
|
|
return plural;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|