Commit e6bd0db3 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

removed the description of the image title format string from the blurb

2003-01-26  Sven Neumann  <sven@gimp.org>

	* app/config/gimprc-blurbs.h: removed the description of the image
	title format string from the blurb ...

	* app/config/gimpconfig-dump.c: ... and added it here.  Slightly
	improved manpage formatting.

	* app/config/gimpconfig-deserialize.c: fixed a typo.

	* docs/gimprc-1.3.5.in
	* etc/gimprc: regenerated.
parent 5031fd61
2003-01-26 Sven Neumann <sven@gimp.org>
* app/config/gimprc-blurbs.h: removed the description of the image
title format string from the blurb ...
* app/config/gimpconfig-dump.c: ... and added it here. Slightly
improved manpage formatting.
* app/config/gimpconfig-deserialize.c: fixed a typo.
* docs/gimprc-1.3.5.in
* etc/gimprc: regenerated.
2003-01-25 Sven Neumann <sven@gimp.org>
 
* app/widgets/gimppropwidgets.c: add a tooltip if a param_spec has
......
......@@ -275,7 +275,8 @@ gimp_config_deserialize_property (GObject *object,
}
else
{
token = gimp_config_deserialize_value (&value, object, prop_spec, scanner);
token = gimp_config_deserialize_value (&value,
object, prop_spec, scanner);
}
if (token == G_TOKEN_RIGHT_PAREN &&
......@@ -526,7 +527,7 @@ gimp_config_deserialize_path (GValue *value,
if (scanner->value.v_string)
{
/* Check if the string can be expanded
* and converted to thde filesystem encoding.
* and converted to the filesystem encoding.
*/
gchar *expand = gimp_config_path_expand (scanner->value.v_string,
TRUE, &error);
......
......@@ -43,9 +43,21 @@
#include "gimprc.h"
static gint dump_system_gimprc (gint fd);
static gint dump_man_page (gint fd);
typedef enum
{
DUMP_NONE,
DUMP_DEFAULT,
DUMP_COMMENT,
DUMP_MANPAGE
} DumpFormat;
static gint dump_gimprc (DumpFormat format,
gint fd);
static void dump_gimprc_system (GObject *rc,
gint fd);
static void dump_gimprc_manpage (GObject *rc,
gint fd);
static gchar * dump_describe_param (GParamSpec *param_spec);
static void dump_with_linebreaks (gint fd,
const gchar *text);
......@@ -55,19 +67,17 @@ int
main (int argc,
char *argv[])
{
GObject *rc;
DumpFormat format = DUMP_DEFAULT;
g_type_init ();
if (argc > 1)
{
if (strcmp (argv[1], "--system-gimprc") == 0)
{
return dump_system_gimprc (1);
format = DUMP_COMMENT;
}
else if (strcmp (argv[1], "--man-page") == 0)
{
return dump_man_page (1);
format = DUMP_MANPAGE;
}
else if (strcmp (argv[1], "--version") == 0)
{
......@@ -92,13 +102,40 @@ main (int argc,
}
}
return dump_gimprc (format, 1);
}
static gint
dump_gimprc (DumpFormat format,
gint fd)
{
GObject *rc;
if (format == DUMP_NONE)
return EXIT_SUCCESS;
g_type_init ();
rc = g_object_new (GIMP_TYPE_RC,
"module-load-inhibit", "foo", /* for completeness */
NULL);
g_print ("# Dump of the GIMP default configuration\n\n");
gimp_config_serialize_properties (rc, 1, 0);
g_print ("\n");
switch (format)
{
case DUMP_DEFAULT:
g_print ("# Dump of the GIMP default configuration\n\n");
gimp_config_serialize_properties (rc, 1, 0);
g_print ("\n");
break;
case DUMP_COMMENT:
dump_gimprc_system (rc, fd);
break;
case DUMP_MANPAGE:
dump_gimprc_manpage (rc, fd);
break;
default:
break;
}
g_object_unref (rc);
......@@ -122,26 +159,20 @@ static const gchar *system_gimprc_header =
"# it is interpreted relative to your home directory.\n"
"\n";
static gint
dump_system_gimprc (gint fd)
static void
dump_gimprc_system (GObject *rc,
gint fd)
{
GObjectClass *klass;
GParamSpec **property_specs;
GObject *rc;
GString *str;
guint n_property_specs;
guint i;
str = g_string_new (system_gimprc_header);
write (fd, str->str, str->len);
rc = g_object_new (GIMP_TYPE_RC,
"module-load-inhibit", "foo", /* for completeness */
NULL);
klass = G_OBJECT_GET_CLASS (rc);
property_specs = g_object_class_list_properties (klass, &n_property_specs);
for (i = 0; i < n_property_specs; i++)
......@@ -173,12 +204,7 @@ dump_system_gimprc (gint fd)
}
g_free (property_specs);
g_object_unref (rc);
g_string_free (str, TRUE);
return EXIT_SUCCESS;
}
......@@ -268,24 +294,20 @@ static const gchar *man_page_footer =
".BR gimp-remote (1)\n";
static gint
dump_man_page (gint fd)
static void
dump_gimprc_manpage (GObject *rc,
gint fd)
{
GObjectClass *klass;
GParamSpec **property_specs;
GObject *rc;
GString *str;
guint n_property_specs;
guint i;
str = g_string_new (man_page_header);
write (fd, str->str, str->len);
write (fd, man_page_header, strlen (man_page_header));
str = g_string_new (NULL);
rc = g_object_new (GIMP_TYPE_RC, NULL);
klass = G_OBJECT_GET_CLASS (rc);
property_specs = g_object_class_list_properties (klass, &n_property_specs);
for (i = 0; i < n_property_specs; i++)
......@@ -314,18 +336,39 @@ dump_man_page (gint fd)
}
g_free (property_specs);
g_object_unref (rc);
g_string_free (str, TRUE);
write (fd, man_page_path, strlen (man_page_path));
write (fd, man_page_footer, strlen (man_page_footer));
return EXIT_SUCCESS;
}
static const gchar * display_format_description =
"This is a format string; certain % character sequences are recognised and "
"expanded as follows:\n"
"\n"
"%% literal percent sign\n"
"%f bare filename, or \"Untitled\"\n"
"%F full path to file, or \"Untitled\"\n"
"%p PDB image id\n"
"%i view instance number\n"
"%t image type (RGB, grayscale, indexed)\n"
"%z zoom factor as a percentage\n"
"%s source scale factor\n"
"%d destination scale factor\n"
"%Dx expands to x if the image is dirty, the empty string otherwise\n"
"%Cx expands to x if the image is clean, the empty string otherwise\n"
"%m memory used by the image\n"
"%l the number of layers\n"
"%L the name of the active layer/channel\n"
"%w image width in pixels\n"
"%W image width in real-world units\n"
"%h image height in pixels\n"
"%H image height in real-world units\n"
"%u unit symbol\n"
"%U unit abbreviation\n\n";
static gchar *
dump_describe_param (GParamSpec *param_spec)
{
......@@ -426,7 +469,17 @@ dump_describe_param (GParamSpec *param_spec)
values = "This is a float value.";
break;
case G_TYPE_STRING:
values = "This is a string value.";
/* eek */
if (strcmp (g_param_spec_get_name (param_spec), "image-title-format")
&&
strcmp (g_param_spec_get_name (param_spec), "image-status-format"))
{
values = "This is a string value.";
}
else
{
values = display_format_description;
}
break;
case G_TYPE_ENUM:
{
......@@ -503,6 +556,9 @@ dump_with_linebreaks (gint fd,
write (fd, text, i);
write (fd, "\n", 1);
if (*t == '\n')
write (fd, ".br\n", 4);
i++;
text += i;
......
......@@ -3,8 +3,10 @@
#ifndef __GIMP_RC_BLURBS_H__
#define __GIMP_RC_BLURBS_H__
/* Not all strings defined here are used in the user interface
* and only those that are should be marked for translation.
* (the preferences dialog mainly) and only those that are should
* be marked for translation.
*/
#define BRUSH_PATH_BLURB \
......@@ -122,33 +124,10 @@ N_("Tools such as fuzzy-select and bucket fill find regions based on a " \
N_("Sets the browser used by the help system.")
#define IMAGE_STATUS_FORMAT_BLURB \
"Sets the text to appear in image window status bars. See " \
"image-title-format for the list of possible % sequences."
N_("Sets the text to appear in image window status bars.")
#define IMAGE_TITLE_FORMAT_BLURB \
"Sets the text to appear in image window titles. Certain % character " \
"sequences are recognised and expanded as follows:\n" \
"\n" \
"%% literal percent sign\n" \
"%f bare filename, or \"Untitled\"\n" \
"%F full path to file, or \"Untitled\"\n" \
"%p PDB image id\n" \
"%i view instance number\n" \
"%t image type (RGB, grayscale, indexed)\n" \
"%z zoom factor as a percentage\n" \
"%s source scale factor\n" \
"%d destination scale factor\n" \
"%Dx expands to x if the image is dirty, the empty string otherwise\n" \
"%Cx expands to x if the image is clean, the empty string otherwise\n" \
"%m memory used by the image\n" \
"%l the number of layers\n" \
"%L the name of the active layer/channel\n" \
"%w image width in pixels\n" \
"%W image width in real-world units\n" \
"%h image height in pixels\n" \
"%H image height in real-world units\n" \
"%u unit symbol\n" \
"%U unit abbreviation\n\n"
N_("Sets the text to appear in image window titles.")
#define INFO_WINDOW_PER_DISPLAY_BLURB \
N_("When set to yes, the GIMP will use a different info window per image " \
......@@ -285,7 +264,7 @@ N_("When set to yes, enables tear off menus.")
#define TEMP_PATH_BLURB \
N_("Sets the temporary storage directory. Files will appear here " \
"during the course of running the GIMP. Most files will disappear " \
"when the GIMP exits, but some files are likely to remain, so it is" \
"when the GIMP exits, but some files are likely to remain, so it is " \
"best if this directory not be one that is shared by other users.")
#define THEME_BLURB \
......
......@@ -40,9 +40,8 @@ Valid properties and their default values are:
Sets the temporary storage directory. Files will appear here during the course
of running the GIMP. Most files will disappear when the GIMP exits, but some
files are likely to remain, such as working palette files, so it is best if
this directory not be one that is shared by other users or is cleared on
machine reboot such as /tmp. This is a single folder.
files are likely to remain, so it is best if this directory not be one that is
shared by other users. This is a single folder.
.TP
(swap-path "${gimp_dir}")
......@@ -58,8 +57,8 @@ desirable to put your swap file in "/tmp". This is a single folder.
(stingy-memory-use no)
There is always a tradeoff between memory usage and speed. In most cases, the
GIMP opts for speed over memory. However, if memory is a big issue, set
stingy-memory-use to yes. Possible values are yes and no.
GIMP opts for speed over memory. However, if memory is a big issue, try to
enable this setting. Possible values are yes and no.
.TP
(num-processors 1)
......@@ -219,6 +218,11 @@ value.
Sets the pluginrc search path. This is a single filename.
.TP
(module-load-inhibit "foo")
To inhibit loading of a module, add its name here. This is a string value.
.TP
(preview-size small)
......@@ -228,7 +232,8 @@ small, medium, large, extra-large, huge, enormous and gigantic.
.TP
(thumbnail-size normal)
Sets the thumbnail size. Possible values are none, normal and large.
Sets the size of the thumbnail saved with each image. Possible values are
none, normal and large.
.TP
(gamma-correction 1.000000)
......@@ -245,7 +250,7 @@ values are yes and no.
(min-colors 144)
Generally only a concern for 8-bit displays, this sets the minimum number of
colors. This is an integer value.
system colors allocated for the GIMP. This is an integer value.
.TP
(marching-ants-speed 300)
......@@ -257,15 +262,14 @@ milliseconds (less time indicates faster marching). This is an integer value.
(colormap-cycling no)
Specify that marching ants for selected regions will be drawn with colormap
cycling as oposed to redrawing with different stipple masks. This color
cycling option works only with 8-bit displays. Possible values are yes and
no.
cycling as opposed to be drawn as animated lines. This color cycling option
works only with 8-bit displays. Possible values are yes and no.
.TP
(resize-windows-on-zoom no)
When zooming into and out of images, this setting this option to yes enables
the automatic resizing of windows. Possible values are yes and no.
When zooming into and out of images, setting this option to yes enables the
automatic resizing of windows. Possible values are yes and no.
.TP
(resize-windows-on-resize no)
......@@ -304,55 +308,122 @@ yes and no.
.TP
(image-title-format "%f-%p.%i (%t)")
Sets the text to appear in image window titles. Certain % character sequences
are recognised and expanded as follows:
Sets the text to appear in image window titles. This is a format string;
certain % character sequences are recognised and expanded as follows:
.br
.br
%% literal percent sign
.br
%f bare filename, or "Untitled"
.br
%F full path to file, or "Untitled"
.br
%p PDB image id
.br
%i view instance number
.br
%t image type (RGB, grayscale, indexed)
.br
%z zoom factor as a percentage
.br
%s source scale factor
.br
%d destination scale factor
.br
%Dx expands to x if the image is dirty, the empty string otherwise
.br
%Cx expands to x if the image is clean, the empty string otherwise
.br
%m memory used by the image
.br
%l the number of layers
.br
%L the name of the active layer/channel
.br
%w image width in pixels
.br
%W image width in real-world units
.br
%h image height in pixels
.br
%H image height in real-world units
.br
%u unit symbol
.br
%U unit abbreviation
.br
This is a string value.
.br
.TP
(image-status-format "%f-%p.%i (%t)")
Sets the text to appear in image window status bars. See image-title-format
for the list of possible % sequences. This is a string value.
Sets the text to appear in image window status bars. This is a format string;
certain % character sequences are recognised and expanded as follows:
.br
.br
%% literal percent sign
.br
%f bare filename, or "Untitled"
.br
%F full path to file, or "Untitled"
.br
%p PDB image id
.br
%i view instance number
.br
%t image type (RGB, grayscale, indexed)
.br
%z zoom factor as a percentage
.br
%s source scale factor
.br
%d destination scale factor
.br
%Dx expands to x if the image is dirty, the empty string otherwise
.br
%Cx expands to x if the image is clean, the empty string otherwise
.br
%m memory used by the image
.br
%l the number of layers
.br
%L the name of the active layer/channel
.br
%w image width in pixels
.br
%W image width in real-world units
.br
%h image height in pixels
.br
%H image height in real-world units
.br
%u unit symbol
.br
%U unit abbreviation
.br
.br
.TP
(show-menubar no)
Sets the menubar visibility. This can also be toggled with the View->Toggle
Menubar command. Possible values are yes and no.
Sets the default menubar visibility. This can also be toggled with the
View->Toggle Menubar command. Possible values are yes and no.
.TP
(show-rulers yes)
Sets the ruler visibility. This can also be toggled with the View->Toggle
Rulers command. Possible values are yes and no.
Sets the default ruler visibility. This can also be toggled with the
View->Toggle Rulers command. Possible values are yes and no.
.TP
(show-statusbar yes)
Set to yes to make the statusbar visible. This can also be toggled with the
View->Toggle Statusbar command. Possible values are yes and no.
Set to yes to make the statusbar visible by default. This can also be toggled
with the View->Toggle Statusbar command. Possible values are yes and no.
.TP
(confirm-on-close yes)
......@@ -383,20 +454,22 @@ system. Possible values are yes and no.
.TP
(navigation-preview-size medium)
Sets the navigation preview size. Possible values are none, tiny,
extra-small, small, medium, large, extra-large, huge, enormous and gigantic.
Sets the size of the navigation preview available in the lower right corner of
the image window. Possible values are none, tiny, extra-small, small, medium,
large, extra-large, huge, enormous and gigantic.
.TP
(canvas-padding-mode default)
Sets the canvas padding mode. Possible values are default, light-check,
dark-check and custom.
Specifies how the area around the image should be drawn. Possible values are
default, light-check, dark-check and custom.
.TP
(canvas-padding-color (color-rgba 1.000000 1.000000 1.000000 1.000000))
Sets the canvas padding color. The color is specified in the form (color-rgba
red green blue alpha) with channel values as floats between 0.0 and 1.0.
Sets the canvas padding color used if the padding mode is set to custom color.
The color is specified in the form (color-rgba red green blue alpha) with
channel values as floats between 0.0 and 1.0.
.TP
(transparency-size medium-checks)
......@@ -441,15 +514,14 @@ Possible values are yes and no.
.TP
(save-session-info yes)
Remember the positions and sizes of the main dialogs and asks your
window-manager to place them there again the next time you use the GIMP.
Save the positions and sizes of the main dialogs when the GIMP exits.
Possible values are yes and no.
.TP
(restore-session yes)
Let GIMP try to restore your last saved session. Possible values are yes and
no.
Let GIMP try to restore your last saved session on each startup. Possible
values are yes and no.
.TP
(show-tips yes)
......@@ -476,10 +548,11 @@ integer value.
.TP
(max-new-image-size 32M)
Sets the max-new-image-size limit. The integer size can contain a suffix of
'B', 'K', 'M' or 'G' which makes GIMP interpret the size as being specified in
bytes, kilobytes, megabytes or gigabytes. If no suffix is specified the size
defaults to being specified in kilobytes.
GIMP will warn the user if an attempt is made to create an image that would
take more memory than the size specified here. The integer size can contain a
suffix of 'B', 'K', 'M' or 'G' which makes GIMP interpret the size as being
specified in bytes, kilobytes, megabytes or gigabytes. If no suffix is
specified the size defaults to being specified in kilobytes.
.TP
(theme-path "${gimp_dir}/themes:${gimp_data_dir}/themes")
......@@ -501,7 +574,8 @@ and no.
.TP
(help-browser gimp)
Sets the browser gimp-help will use. Possible values are gimp and netscape.
Sets the browser used by the help system. Possible values are gimp and
netscape.
.TP
(fractalexplorer-path "${gimp_dir}/fractalexplorer:${gimp_data_dir}/fractalexplorer")
......
......@@ -40,9 +40,8 @@ Valid properties and their default values are:
Sets the temporary storage directory. Files will appear here during the course
of running the GIMP. Most files will disappear when the GIMP exits, but some
files are likely to remain, such as working palette files, so it is best if
this directory not be one that is shared by other users or is cleared on
machine reboot such as /tmp. This is a single folder.
files are likely to remain, so it is best if this directory not be one that is
shared by other users. This is a single folder.
.TP
(swap-path "${gimp_dir}")
......@@ -58,8 +57,8 @@ desirable to put your swap file in "/tmp". This is a single folder.
(stingy-memory-use no)
There is always a tradeoff between memory usage and speed. In most cases, the
GIMP opts for speed over memory. However, if memory is a big issue, set
stingy-memory-use to yes. Possible values are yes and no.
GIMP opts for speed over memory. However, if memory is a big issue, try to
enable this setting. Possible values are yes and no.
.TP
(num-processors 1)
......@@ -219,6 +218,11 @@ value.
Sets the pluginrc search path. This is a single filename.
.TP
(module-load-inhibit "foo")
To inhibit loading of a module, add its name here. This is a string value.
.TP
(preview-size small)
......@@ -228,7 +232,8 @@ small, medium, large, extra-large, huge, enormous and gigantic.
.TP