1999-03-17 04:14:07 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimpunit.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
|
|
|
* Copyright (C) 1999 Michael Natterer <mitschel@cs.tu-berlin.de>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
1999-05-30 00:35:47 +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
|
|
|
#include "gimpunit.h"
|
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
1999-04-06 20:13:54 +08:00
|
|
|
/* internal structures */
|
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
|
|
|
|
|
|
|
typedef struct {
|
1999-03-03 20:35:12 +08:00
|
|
|
guint delete_on_exit;
|
1999-05-23 01:56:35 +08:00
|
|
|
gdouble factor;
|
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 digits;
|
1999-03-03 20:35:12 +08:00
|
|
|
gchar *identifier;
|
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
|
|
|
gchar *symbol;
|
|
|
|
gchar *abbreviation;
|
|
|
|
gchar *singular;
|
|
|
|
gchar *plural;
|
|
|
|
} GimpUnitDef;
|
|
|
|
|
|
|
|
static GimpUnitDef gimp_unit_defs[UNIT_END] =
|
|
|
|
{
|
1999-03-03 20:35:12 +08:00
|
|
|
/* pseudo unit */
|
1999-03-04 01:10:50 +08:00
|
|
|
{ FALSE, 0.0, 0, "pixels", "px", "px", N_("pixel"), N_("pixels") },
|
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-03-03 20:35:12 +08:00
|
|
|
/* standard units */
|
1999-03-04 01:10:50 +08:00
|
|
|
{ FALSE, 1.0, 2, "inches", "''", "in", N_("inch"), N_("inches") },
|
|
|
|
{ FALSE, 25.4, 1, "millimeters", "mm", "mm", N_("millimeter"), N_("millimeters") },
|
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-03-03 20:35:12 +08:00
|
|
|
/* professional units */
|
1999-03-04 01:10:50 +08:00
|
|
|
{ FALSE, 72.0, 0, "points", "pt", "pt", N_("point"), N_("points") },
|
|
|
|
{ FALSE, 6.0, 1, "picas", "pc", "pc", N_("pica"), N_("picas") },
|
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-04-06 20:13:54 +08:00
|
|
|
/* not a unit at all but kept here to have the strings in one place
|
|
|
|
*/
|
|
|
|
static GimpUnitDef gimp_unit_percent =
|
|
|
|
{
|
|
|
|
FALSE, 0.0, 0, "percent", "%", "%", N_("percent"), N_("percent")
|
|
|
|
};
|
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-04-06 20:13:54 +08:00
|
|
|
/* public functions */
|
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-03-03 20:35:12 +08:00
|
|
|
gint
|
|
|
|
gimp_unit_get_number_of_units (void)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
int number;
|
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_units",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
number = UNIT_END;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
number = return_vals[1].data.d_int32;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return number;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
gint
|
|
|
|
gimp_unit_get_number_of_built_in_units (void)
|
|
|
|
{
|
|
|
|
return UNIT_END;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GUnit
|
1999-05-23 01:56:35 +08:00
|
|
|
gimp_unit_new (gchar *identifier,
|
|
|
|
gdouble factor,
|
|
|
|
gint digits,
|
|
|
|
gchar *symbol,
|
|
|
|
gchar *abbreviation,
|
|
|
|
gchar *singular,
|
|
|
|
gchar *plural)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
GUnit unit;
|
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_new",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_STRING, g_strdup (identifier),
|
|
|
|
PARAM_FLOAT, factor,
|
|
|
|
PARAM_INT32, digits,
|
|
|
|
PARAM_STRING, g_strdup (symbol),
|
|
|
|
PARAM_STRING, g_strdup (abbreviation),
|
|
|
|
PARAM_STRING, g_strdup (singular),
|
|
|
|
PARAM_STRING, g_strdup (plural),
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
unit = UNIT_INCH;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
unit = return_vals[1].data.d_int32;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return unit;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
guint
|
|
|
|
gimp_unit_get_deletion_flag (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
guint flag;
|
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_PIXEL, TRUE);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
|
|
|
if (unit < UNIT_END)
|
|
|
|
return FALSE;
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_deletion_flag",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
flag = TRUE;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
flag = return_vals[1].data.d_int32;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return flag;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gimp_unit_set_deletion_flag (GUnit unit,
|
|
|
|
guint deletion_flag)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
g_return_if_fail (unit >= UNIT_PIXEL);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
if (unit < UNIT_END)
|
|
|
|
return;
|
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_set_deletion_flag",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_INT32, deletion_flag,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-05-23 01:56:35 +08:00
|
|
|
gdouble
|
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
|
|
|
gimp_unit_get_factor (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
1999-05-23 01:56:35 +08:00
|
|
|
gdouble factor;
|
1999-03-17 04:14:07 +08:00
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_INCH, 1.0);
|
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-03-03 20:35:12 +08:00
|
|
|
if (unit < UNIT_END)
|
|
|
|
return gimp_unit_defs[unit].factor;
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_factor",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
factor = 1.0;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
factor = return_vals[1].data.d_float;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return factor;
|
1999-03-03 20:35:12 +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
|
|
|
|
gimp_unit_get_digits (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
gint digits;
|
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_INCH, 2.0);
|
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-03-03 20:35:12 +08:00
|
|
|
if (unit < UNIT_END)
|
|
|
|
return gimp_unit_defs[unit].digits;
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_digits",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
digits = 2.0;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
digits = return_vals[1].data.d_int32;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return digits;
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
1999-03-03 20:35:12 +08:00
|
|
|
gimp_unit_get_identifier (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
gchar *identifier;
|
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_PIXEL, g_strdup (""));
|
1999-03-03 20:35:12 +08:00
|
|
|
|
|
|
|
if (unit < UNIT_END)
|
1999-03-17 04:14:07 +08:00
|
|
|
return g_strdup (gimp_unit_defs[unit].identifier);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-04-06 20:13:54 +08:00
|
|
|
if (unit == UNIT_PERCENT)
|
|
|
|
return g_strdup (gimp_unit_percent.identifier);
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_identifier",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
identifier = NULL;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
identifier = g_strdup (return_vals[1].data.d_string);
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return identifier ? identifier : g_strdup ("");
|
1999-03-03 20:35:12 +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
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
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
|
|
|
gimp_unit_get_symbol (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
gchar *symbol;
|
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_PIXEL, g_strdup (""));
|
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-03-03 20:35:12 +08:00
|
|
|
if (unit < UNIT_END)
|
1999-03-17 04:14:07 +08:00
|
|
|
return g_strdup (gimp_unit_defs[unit].symbol);
|
|
|
|
|
1999-04-06 20:13:54 +08:00
|
|
|
if (unit == UNIT_PERCENT)
|
|
|
|
return g_strdup (gimp_unit_percent.symbol);
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_symbol",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
symbol = NULL;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
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);
|
|
|
|
|
|
|
|
return symbol ? symbol : g_strdup ("");
|
1999-03-03 20:35:12 +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
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
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
|
|
|
gimp_unit_get_abbreviation (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
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-03-17 04:14:07 +08:00
|
|
|
gchar *abbreviation;
|
|
|
|
|
1999-04-06 20:13:54 +08:00
|
|
|
g_return_val_if_fail (unit >= UNIT_PIXEL, g_strdup (""));
|
|
|
|
|
|
|
|
if (unit < UNIT_END)
|
|
|
|
return g_strdup (gimp_unit_defs[unit].abbreviation);
|
|
|
|
|
|
|
|
if (unit == UNIT_PERCENT)
|
|
|
|
return g_strdup (gimp_unit_percent.abbreviation);
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_abbreviation",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
abbreviation = NULL;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
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);
|
|
|
|
|
|
|
|
return abbreviation ? abbreviation : g_strdup ("");
|
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-03-17 04:14:07 +08:00
|
|
|
gchar *
|
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
|
|
|
gimp_unit_get_singular (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
gchar *singular;
|
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_PIXEL, g_strdup (""));
|
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-03-03 20:35:12 +08:00
|
|
|
if (unit < UNIT_END)
|
1999-03-17 04:14:07 +08:00
|
|
|
return g_strdup (gettext (gimp_unit_defs[unit].singular));
|
|
|
|
|
1999-04-06 20:13:54 +08:00
|
|
|
if (unit == UNIT_PERCENT)
|
|
|
|
return g_strdup (gettext (gimp_unit_percent.singular));
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_singular",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
singular = NULL;
|
|
|
|
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 ? singular : g_strdup ("");
|
1999-03-03 20:35:12 +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
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
gchar *
|
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
|
|
|
gimp_unit_get_plural (GUnit unit)
|
|
|
|
{
|
1999-03-17 04:14:07 +08:00
|
|
|
GParam *return_vals;
|
|
|
|
int nreturn_vals;
|
|
|
|
|
|
|
|
gchar *plural;
|
|
|
|
|
|
|
|
g_return_val_if_fail (unit >= UNIT_PIXEL, g_strdup (""));
|
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-03-03 20:35:12 +08:00
|
|
|
if (unit < UNIT_END)
|
1999-03-17 04:14:07 +08:00
|
|
|
return g_strdup (gettext (gimp_unit_defs[unit].plural));
|
|
|
|
|
1999-04-06 20:13:54 +08:00
|
|
|
if (unit == UNIT_PERCENT)
|
|
|
|
return g_strdup (gettext (gimp_unit_percent.plural));
|
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp_unit_get_plural",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_INT32, unit,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
plural = NULL;
|
|
|
|
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);
|
1999-03-03 20:35:12 +08:00
|
|
|
|
1999-03-17 04:14:07 +08:00
|
|
|
return plural ? plural : g_strdup ("");
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|