mirror of https://github.com/GNOME/gimp.git
create modules/ directory in user's ~/.gimp-1.1 dir include description of
Mon Jan 25 20:40:26 GMT 1999 Austin Donnelly <austin@gimp.org> * user_install: create modules/ directory in user's ~/.gimp-1.1 dir * app/install.c: include description of ~/.gimp-1.1/modules, plus scroll info back to top when done inserting text since it looks nicer. Also make window that holds result of running user_install a little larger so we see all messages at once. * app/gdisplay.h: FUNSCALE_{X,Y} macros for floating point unscales. * app/scale.c: show rulers in real-world units (inches/cm/pixels) if dot-for-dot is turned off, plus smoother ruler updates by using FUNSCALE so we don't jump in pixel steps at high magnification factors. * app/interface.c: don't set the ruler metrics for now - it's easier to do the calculations in pixels. Need to rethink this a little anyway. * docs/parasites.txt: added jpeg parasite info.
This commit is contained in:
parent
6abe8d0604
commit
b1af71cf86
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
Mon Jan 25 20:40:26 GMT 1999 Austin Donnelly <austin@gimp.org>
|
||||
|
||||
* user_install: create modules/ directory in user's ~/.gimp-1.1 dir
|
||||
* app/install.c: include description of ~/.gimp-1.1/modules, plus
|
||||
scroll info back to top when done inserting text since it
|
||||
looks nicer. Also make window that holds result of running
|
||||
user_install a little larger so we see all messages at once.
|
||||
|
||||
* app/gdisplay.h: FUNSCALE_{X,Y} macros for floating point
|
||||
unscales.
|
||||
* app/scale.c: show rulers in real-world units (inches/cm/pixels)
|
||||
if dot-for-dot is turned off, plus smoother ruler updates by
|
||||
using FUNSCALE so we don't jump in pixel steps at high
|
||||
magnification factors.
|
||||
* app/interface.c: don't set the ruler metrics for now - it's
|
||||
easier to do the calculations in pixels. Need to rethink this
|
||||
a little anyway.
|
||||
|
||||
* docs/parasites.txt: added jpeg parasite info.
|
||||
|
||||
Sat Jan 23 20:36:06 GMT 1999 Austin Donnelly <austin@gimp.org>
|
||||
|
||||
* app/color_select.c: don't try and gdk_window_get_size() when we
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
/* unscale values */
|
||||
#define UNSCALEX(g,x) ((int)(x / SCALEFACTOR_X(g)))
|
||||
#define UNSCALEY(g,y) ((int)(y / SCALEFACTOR_Y(g)))
|
||||
/* (and float-returning versions) */
|
||||
#define FUNSCALEX(g,x) ((x / SCALEFACTOR_X(g)))
|
||||
#define FUNSCALEY(g,y) ((y / SCALEFACTOR_Y(g)))
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -192,11 +192,11 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPaths to search for brushes, palettes, gradients\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tpatterns, and plug-ins are also configured here.\n"), -1);
|
||||
_("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("pluginrc\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPlug-ins and extensions are extern programs run by\n"), -1);
|
||||
_("\t\tPlug-ins and extensions are external programs run by\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tthe GIMP which provide additional functionality.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -299,6 +299,18 @@ install_help (InstallCallback callback)
|
|||
_("\t\twide GIMP plug-in directories when searching for\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tplug-ins.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("modules\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThis subdirectory can be used to store user created,\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThe default gimprc file checks this subdirectory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tin addition to the system-wide GIMP module directory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\twhen searching for modules to load when initialising.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("scripts\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -322,6 +334,9 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1);
|
||||
|
||||
/* scroll back to the top */
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0);
|
||||
|
||||
gtk_widget_show (vsb);
|
||||
gtk_widget_show (text);
|
||||
gtk_widget_show (table);
|
||||
|
@ -389,7 +404,7 @@ install_run (InstallCallback callback)
|
|||
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
||||
vsb = gtk_vscrollbar_new (vadj);
|
||||
text = gtk_text_new (NULL, vadj);
|
||||
gtk_widget_set_usize (text, 384, 256);
|
||||
gtk_widget_set_usize (text, 384, 356);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
|
||||
|
@ -447,6 +462,8 @@ install_run (InstallCallback callback)
|
|||
g_snprintf (buffer, sizeof(buffer), "%s/user_install %s %s",
|
||||
DATADIR, DATADIR, gimp_directory ());
|
||||
|
||||
/* urk - should really use something better than popen(), since
|
||||
* we can't tell if the installation script failed --austin */
|
||||
if ((pfp = popen (buffer, "r")) != NULL)
|
||||
{
|
||||
while (fgets (buffer, 2048, pfp))
|
||||
|
|
|
@ -158,6 +158,37 @@ change_scale (GDisplay *gdisp,
|
|||
}
|
||||
|
||||
|
||||
/* scale image coord to realworld units (cm, inches, pixels) */
|
||||
static gdouble
|
||||
img2real (GDisplay *g, gboolean xdir, gdouble a)
|
||||
{
|
||||
float res;
|
||||
|
||||
if (g->dot_for_dot)
|
||||
return a;
|
||||
|
||||
if (xdir)
|
||||
res = monitor_xres;
|
||||
else
|
||||
res = monitor_yres;
|
||||
|
||||
switch (ruler_units) {
|
||||
case GTK_PIXELS:
|
||||
return a;
|
||||
|
||||
case GTK_INCHES:
|
||||
return a / res;
|
||||
|
||||
case GTK_CENTIMETERS:
|
||||
return a * 2.54 / res;
|
||||
|
||||
default:
|
||||
g_warning ("unknown ruler_units %d, can't happen", ruler_units);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
setup_scale (GDisplay *gdisp)
|
||||
{
|
||||
|
@ -168,8 +199,8 @@ setup_scale (GDisplay *gdisp)
|
|||
|
||||
sx = SCALEX(gdisp, gdisp->gimage->width);
|
||||
sy = SCALEY(gdisp, gdisp->gimage->height);
|
||||
stepx = SCALEX(gdisp, 1);
|
||||
stepy = SCALEY(gdisp, 1);
|
||||
stepx = SCALEFACTOR_X(gdisp);
|
||||
stepy = SCALEFACTOR_Y(gdisp);
|
||||
|
||||
gdisp->hsbdata->value = gdisp->offset_x;
|
||||
gdisp->hsbdata->upper = sx;
|
||||
|
@ -190,37 +221,47 @@ setup_scale (GDisplay *gdisp)
|
|||
vruler = GTK_RULER (gdisp->vrule);
|
||||
|
||||
hruler->lower = 0;
|
||||
hruler->upper = UNSCALEX (gdisp, gdisp->disp_width);
|
||||
hruler->max_size = MAXIMUM (gdisp->gimage->width, gdisp->gimage->height);
|
||||
hruler->upper = img2real (gdisp, TRUE, FUNSCALEX (gdisp, gdisp->disp_width));
|
||||
hruler->max_size = img2real (gdisp, TRUE, MAXIMUM (gdisp->gimage->width,
|
||||
gdisp->gimage->height));
|
||||
|
||||
vruler->lower = 0;
|
||||
vruler->upper = UNSCALEY (gdisp, gdisp->disp_height);
|
||||
vruler->max_size = MAXIMUM (gdisp->gimage->width, gdisp->gimage->height);
|
||||
vruler->upper = img2real(gdisp, FALSE, FUNSCALEY(gdisp, gdisp->disp_height));
|
||||
vruler->max_size = img2real (gdisp, FALSE, MAXIMUM (gdisp->gimage->width,
|
||||
gdisp->gimage->height));
|
||||
|
||||
if (sx < gdisp->disp_width)
|
||||
{
|
||||
gdisp->disp_xoffset = (gdisp->disp_width - sx) / 2;
|
||||
hruler->lower -= UNSCALEX (gdisp, (double) gdisp->disp_xoffset);
|
||||
hruler->upper -= UNSCALEX (gdisp, (double) gdisp->disp_xoffset);
|
||||
hruler->lower -= img2real(gdisp, TRUE,
|
||||
FUNSCALEX(gdisp,(double) gdisp->disp_xoffset));
|
||||
hruler->upper -= img2real(gdisp, TRUE,
|
||||
FUNSCALEX(gdisp,(double) gdisp->disp_xoffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdisp->disp_xoffset = 0;
|
||||
hruler->lower += UNSCALEX (gdisp, (double) gdisp->offset_x);
|
||||
hruler->upper += UNSCALEX (gdisp, (double) gdisp->offset_x);
|
||||
hruler->lower += img2real (gdisp, TRUE,
|
||||
FUNSCALEX (gdisp, (double) gdisp->offset_x));
|
||||
hruler->upper += img2real (gdisp, TRUE,
|
||||
FUNSCALEX (gdisp, (double) gdisp->offset_x));
|
||||
}
|
||||
|
||||
if (sy < gdisp->disp_height)
|
||||
{
|
||||
gdisp->disp_yoffset = (gdisp->disp_height - sy) / 2;
|
||||
vruler->lower -= UNSCALEY (gdisp, (double) gdisp->disp_yoffset);
|
||||
vruler->upper -= UNSCALEY (gdisp, (double) gdisp->disp_yoffset);
|
||||
vruler->lower -= img2real(gdisp, FALSE,
|
||||
FUNSCALEY(gdisp,(double) gdisp->disp_yoffset));
|
||||
vruler->upper -= img2real(gdisp, FALSE,
|
||||
FUNSCALEY(gdisp,(double) gdisp->disp_yoffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdisp->disp_yoffset = 0;
|
||||
vruler->lower += UNSCALEY (gdisp, (double) gdisp->offset_y);
|
||||
vruler->upper += UNSCALEY (gdisp, (double) gdisp->offset_y);
|
||||
vruler->lower += img2real (gdisp, FALSE,
|
||||
FUNSCALEY (gdisp, (double) gdisp->offset_y));
|
||||
vruler->upper += img2real (gdisp, FALSE,
|
||||
FUNSCALEY (gdisp, (double) gdisp->offset_y));
|
||||
}
|
||||
|
||||
gtk_widget_draw (GTK_WIDGET (hruler), NULL);
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
/* unscale values */
|
||||
#define UNSCALEX(g,x) ((int)(x / SCALEFACTOR_X(g)))
|
||||
#define UNSCALEY(g,y) ((int)(y / SCALEFACTOR_Y(g)))
|
||||
/* (and float-returning versions) */
|
||||
#define FUNSCALEX(g,x) ((x / SCALEFACTOR_X(g)))
|
||||
#define FUNSCALEY(g,y) ((y / SCALEFACTOR_Y(g)))
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -648,7 +648,10 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->hrule = gtk_hruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_ruler_set_metric (GTK_RULER (gdisp->hrule), ruler_units);
|
||||
/* Still need to sort out the best way of using this metrics stuff.
|
||||
* For the moment, we do everything in terms of pixels
|
||||
* -- austin 25/Jan/99 */
|
||||
/*gtk_ruler_set_metric (GTK_RULER (gdisp->hrule), ruler_units);*/
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
(GtkSignalFunc) GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->hrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT (gdisp->hrule));
|
||||
|
@ -659,7 +662,7 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->vrule = gtk_vruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_ruler_set_metric (GTK_RULER (gdisp->vrule), ruler_units);
|
||||
/*gtk_ruler_set_metric (GTK_RULER (gdisp->vrule), ruler_units);*/
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
(GtkSignalFunc) GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->vrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT (gdisp->vrule));
|
||||
|
|
|
@ -158,6 +158,37 @@ change_scale (GDisplay *gdisp,
|
|||
}
|
||||
|
||||
|
||||
/* scale image coord to realworld units (cm, inches, pixels) */
|
||||
static gdouble
|
||||
img2real (GDisplay *g, gboolean xdir, gdouble a)
|
||||
{
|
||||
float res;
|
||||
|
||||
if (g->dot_for_dot)
|
||||
return a;
|
||||
|
||||
if (xdir)
|
||||
res = monitor_xres;
|
||||
else
|
||||
res = monitor_yres;
|
||||
|
||||
switch (ruler_units) {
|
||||
case GTK_PIXELS:
|
||||
return a;
|
||||
|
||||
case GTK_INCHES:
|
||||
return a / res;
|
||||
|
||||
case GTK_CENTIMETERS:
|
||||
return a * 2.54 / res;
|
||||
|
||||
default:
|
||||
g_warning ("unknown ruler_units %d, can't happen", ruler_units);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
setup_scale (GDisplay *gdisp)
|
||||
{
|
||||
|
@ -168,8 +199,8 @@ setup_scale (GDisplay *gdisp)
|
|||
|
||||
sx = SCALEX(gdisp, gdisp->gimage->width);
|
||||
sy = SCALEY(gdisp, gdisp->gimage->height);
|
||||
stepx = SCALEX(gdisp, 1);
|
||||
stepy = SCALEY(gdisp, 1);
|
||||
stepx = SCALEFACTOR_X(gdisp);
|
||||
stepy = SCALEFACTOR_Y(gdisp);
|
||||
|
||||
gdisp->hsbdata->value = gdisp->offset_x;
|
||||
gdisp->hsbdata->upper = sx;
|
||||
|
@ -190,37 +221,47 @@ setup_scale (GDisplay *gdisp)
|
|||
vruler = GTK_RULER (gdisp->vrule);
|
||||
|
||||
hruler->lower = 0;
|
||||
hruler->upper = UNSCALEX (gdisp, gdisp->disp_width);
|
||||
hruler->max_size = MAXIMUM (gdisp->gimage->width, gdisp->gimage->height);
|
||||
hruler->upper = img2real (gdisp, TRUE, FUNSCALEX (gdisp, gdisp->disp_width));
|
||||
hruler->max_size = img2real (gdisp, TRUE, MAXIMUM (gdisp->gimage->width,
|
||||
gdisp->gimage->height));
|
||||
|
||||
vruler->lower = 0;
|
||||
vruler->upper = UNSCALEY (gdisp, gdisp->disp_height);
|
||||
vruler->max_size = MAXIMUM (gdisp->gimage->width, gdisp->gimage->height);
|
||||
vruler->upper = img2real(gdisp, FALSE, FUNSCALEY(gdisp, gdisp->disp_height));
|
||||
vruler->max_size = img2real (gdisp, FALSE, MAXIMUM (gdisp->gimage->width,
|
||||
gdisp->gimage->height));
|
||||
|
||||
if (sx < gdisp->disp_width)
|
||||
{
|
||||
gdisp->disp_xoffset = (gdisp->disp_width - sx) / 2;
|
||||
hruler->lower -= UNSCALEX (gdisp, (double) gdisp->disp_xoffset);
|
||||
hruler->upper -= UNSCALEX (gdisp, (double) gdisp->disp_xoffset);
|
||||
hruler->lower -= img2real(gdisp, TRUE,
|
||||
FUNSCALEX(gdisp,(double) gdisp->disp_xoffset));
|
||||
hruler->upper -= img2real(gdisp, TRUE,
|
||||
FUNSCALEX(gdisp,(double) gdisp->disp_xoffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdisp->disp_xoffset = 0;
|
||||
hruler->lower += UNSCALEX (gdisp, (double) gdisp->offset_x);
|
||||
hruler->upper += UNSCALEX (gdisp, (double) gdisp->offset_x);
|
||||
hruler->lower += img2real (gdisp, TRUE,
|
||||
FUNSCALEX (gdisp, (double) gdisp->offset_x));
|
||||
hruler->upper += img2real (gdisp, TRUE,
|
||||
FUNSCALEX (gdisp, (double) gdisp->offset_x));
|
||||
}
|
||||
|
||||
if (sy < gdisp->disp_height)
|
||||
{
|
||||
gdisp->disp_yoffset = (gdisp->disp_height - sy) / 2;
|
||||
vruler->lower -= UNSCALEY (gdisp, (double) gdisp->disp_yoffset);
|
||||
vruler->upper -= UNSCALEY (gdisp, (double) gdisp->disp_yoffset);
|
||||
vruler->lower -= img2real(gdisp, FALSE,
|
||||
FUNSCALEY(gdisp,(double) gdisp->disp_yoffset));
|
||||
vruler->upper -= img2real(gdisp, FALSE,
|
||||
FUNSCALEY(gdisp,(double) gdisp->disp_yoffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdisp->disp_yoffset = 0;
|
||||
vruler->lower += UNSCALEY (gdisp, (double) gdisp->offset_y);
|
||||
vruler->upper += UNSCALEY (gdisp, (double) gdisp->offset_y);
|
||||
vruler->lower += img2real (gdisp, FALSE,
|
||||
FUNSCALEY (gdisp, (double) gdisp->offset_y));
|
||||
vruler->upper += img2real (gdisp, FALSE,
|
||||
FUNSCALEY (gdisp, (double) gdisp->offset_y));
|
||||
}
|
||||
|
||||
gtk_widget_draw (GTK_WIDGET (hruler), NULL);
|
||||
|
|
|
@ -648,7 +648,10 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->hrule = gtk_hruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_ruler_set_metric (GTK_RULER (gdisp->hrule), ruler_units);
|
||||
/* Still need to sort out the best way of using this metrics stuff.
|
||||
* For the moment, we do everything in terms of pixels
|
||||
* -- austin 25/Jan/99 */
|
||||
/*gtk_ruler_set_metric (GTK_RULER (gdisp->hrule), ruler_units);*/
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
(GtkSignalFunc) GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->hrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT (gdisp->hrule));
|
||||
|
@ -659,7 +662,7 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->vrule = gtk_vruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_ruler_set_metric (GTK_RULER (gdisp->vrule), ruler_units);
|
||||
/*gtk_ruler_set_metric (GTK_RULER (gdisp->vrule), ruler_units);*/
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
(GtkSignalFunc) GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->vrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT (gdisp->vrule));
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
/* unscale values */
|
||||
#define UNSCALEX(g,x) ((int)(x / SCALEFACTOR_X(g)))
|
||||
#define UNSCALEY(g,y) ((int)(y / SCALEFACTOR_Y(g)))
|
||||
/* (and float-returning versions) */
|
||||
#define FUNSCALEX(g,x) ((x / SCALEFACTOR_X(g)))
|
||||
#define FUNSCALEY(g,y) ((y / SCALEFACTOR_Y(g)))
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -192,11 +192,11 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPaths to search for brushes, palettes, gradients\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tpatterns, and plug-ins are also configured here.\n"), -1);
|
||||
_("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("pluginrc\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPlug-ins and extensions are extern programs run by\n"), -1);
|
||||
_("\t\tPlug-ins and extensions are external programs run by\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tthe GIMP which provide additional functionality.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -299,6 +299,18 @@ install_help (InstallCallback callback)
|
|||
_("\t\twide GIMP plug-in directories when searching for\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tplug-ins.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("modules\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThis subdirectory can be used to store user created,\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThe default gimprc file checks this subdirectory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tin addition to the system-wide GIMP module directory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\twhen searching for modules to load when initialising.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("scripts\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -322,6 +334,9 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1);
|
||||
|
||||
/* scroll back to the top */
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0);
|
||||
|
||||
gtk_widget_show (vsb);
|
||||
gtk_widget_show (text);
|
||||
gtk_widget_show (table);
|
||||
|
@ -389,7 +404,7 @@ install_run (InstallCallback callback)
|
|||
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
||||
vsb = gtk_vscrollbar_new (vadj);
|
||||
text = gtk_text_new (NULL, vadj);
|
||||
gtk_widget_set_usize (text, 384, 256);
|
||||
gtk_widget_set_usize (text, 384, 356);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
|
||||
|
@ -447,6 +462,8 @@ install_run (InstallCallback callback)
|
|||
g_snprintf (buffer, sizeof(buffer), "%s/user_install %s %s",
|
||||
DATADIR, DATADIR, gimp_directory ());
|
||||
|
||||
/* urk - should really use something better than popen(), since
|
||||
* we can't tell if the installation script failed --austin */
|
||||
if ((pfp = popen (buffer, "r")) != NULL)
|
||||
{
|
||||
while (fgets (buffer, 2048, pfp))
|
||||
|
|
|
@ -192,11 +192,11 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPaths to search for brushes, palettes, gradients\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tpatterns, and plug-ins are also configured here.\n"), -1);
|
||||
_("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("pluginrc\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPlug-ins and extensions are extern programs run by\n"), -1);
|
||||
_("\t\tPlug-ins and extensions are external programs run by\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tthe GIMP which provide additional functionality.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -299,6 +299,18 @@ install_help (InstallCallback callback)
|
|||
_("\t\twide GIMP plug-in directories when searching for\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tplug-ins.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("modules\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThis subdirectory can be used to store user created,\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThe default gimprc file checks this subdirectory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tin addition to the system-wide GIMP module directory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\twhen searching for modules to load when initialising.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("scripts\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -322,6 +334,9 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1);
|
||||
|
||||
/* scroll back to the top */
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0);
|
||||
|
||||
gtk_widget_show (vsb);
|
||||
gtk_widget_show (text);
|
||||
gtk_widget_show (table);
|
||||
|
@ -389,7 +404,7 @@ install_run (InstallCallback callback)
|
|||
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
||||
vsb = gtk_vscrollbar_new (vadj);
|
||||
text = gtk_text_new (NULL, vadj);
|
||||
gtk_widget_set_usize (text, 384, 256);
|
||||
gtk_widget_set_usize (text, 384, 356);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
|
||||
|
@ -447,6 +462,8 @@ install_run (InstallCallback callback)
|
|||
g_snprintf (buffer, sizeof(buffer), "%s/user_install %s %s",
|
||||
DATADIR, DATADIR, gimp_directory ());
|
||||
|
||||
/* urk - should really use something better than popen(), since
|
||||
* we can't tell if the installation script failed --austin */
|
||||
if ((pfp = popen (buffer, "r")) != NULL)
|
||||
{
|
||||
while (fgets (buffer, 2048, pfp))
|
||||
|
|
|
@ -648,7 +648,10 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->hrule = gtk_hruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_ruler_set_metric (GTK_RULER (gdisp->hrule), ruler_units);
|
||||
/* Still need to sort out the best way of using this metrics stuff.
|
||||
* For the moment, we do everything in terms of pixels
|
||||
* -- austin 25/Jan/99 */
|
||||
/*gtk_ruler_set_metric (GTK_RULER (gdisp->hrule), ruler_units);*/
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
(GtkSignalFunc) GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->hrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT (gdisp->hrule));
|
||||
|
@ -659,7 +662,7 @@ create_display_shell (GDisplay* gdisp,
|
|||
gdisp->vrule = gtk_vruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_ruler_set_metric (GTK_RULER (gdisp->vrule), ruler_units);
|
||||
/*gtk_ruler_set_metric (GTK_RULER (gdisp->vrule), ruler_units);*/
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
(GtkSignalFunc) GTK_WIDGET_CLASS (GTK_OBJECT (gdisp->vrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT (gdisp->vrule));
|
||||
|
|
69
app/scale.c
69
app/scale.c
|
@ -158,6 +158,37 @@ change_scale (GDisplay *gdisp,
|
|||
}
|
||||
|
||||
|
||||
/* scale image coord to realworld units (cm, inches, pixels) */
|
||||
static gdouble
|
||||
img2real (GDisplay *g, gboolean xdir, gdouble a)
|
||||
{
|
||||
float res;
|
||||
|
||||
if (g->dot_for_dot)
|
||||
return a;
|
||||
|
||||
if (xdir)
|
||||
res = monitor_xres;
|
||||
else
|
||||
res = monitor_yres;
|
||||
|
||||
switch (ruler_units) {
|
||||
case GTK_PIXELS:
|
||||
return a;
|
||||
|
||||
case GTK_INCHES:
|
||||
return a / res;
|
||||
|
||||
case GTK_CENTIMETERS:
|
||||
return a * 2.54 / res;
|
||||
|
||||
default:
|
||||
g_warning ("unknown ruler_units %d, can't happen", ruler_units);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
setup_scale (GDisplay *gdisp)
|
||||
{
|
||||
|
@ -168,8 +199,8 @@ setup_scale (GDisplay *gdisp)
|
|||
|
||||
sx = SCALEX(gdisp, gdisp->gimage->width);
|
||||
sy = SCALEY(gdisp, gdisp->gimage->height);
|
||||
stepx = SCALEX(gdisp, 1);
|
||||
stepy = SCALEY(gdisp, 1);
|
||||
stepx = SCALEFACTOR_X(gdisp);
|
||||
stepy = SCALEFACTOR_Y(gdisp);
|
||||
|
||||
gdisp->hsbdata->value = gdisp->offset_x;
|
||||
gdisp->hsbdata->upper = sx;
|
||||
|
@ -190,37 +221,47 @@ setup_scale (GDisplay *gdisp)
|
|||
vruler = GTK_RULER (gdisp->vrule);
|
||||
|
||||
hruler->lower = 0;
|
||||
hruler->upper = UNSCALEX (gdisp, gdisp->disp_width);
|
||||
hruler->max_size = MAXIMUM (gdisp->gimage->width, gdisp->gimage->height);
|
||||
hruler->upper = img2real (gdisp, TRUE, FUNSCALEX (gdisp, gdisp->disp_width));
|
||||
hruler->max_size = img2real (gdisp, TRUE, MAXIMUM (gdisp->gimage->width,
|
||||
gdisp->gimage->height));
|
||||
|
||||
vruler->lower = 0;
|
||||
vruler->upper = UNSCALEY (gdisp, gdisp->disp_height);
|
||||
vruler->max_size = MAXIMUM (gdisp->gimage->width, gdisp->gimage->height);
|
||||
vruler->upper = img2real(gdisp, FALSE, FUNSCALEY(gdisp, gdisp->disp_height));
|
||||
vruler->max_size = img2real (gdisp, FALSE, MAXIMUM (gdisp->gimage->width,
|
||||
gdisp->gimage->height));
|
||||
|
||||
if (sx < gdisp->disp_width)
|
||||
{
|
||||
gdisp->disp_xoffset = (gdisp->disp_width - sx) / 2;
|
||||
hruler->lower -= UNSCALEX (gdisp, (double) gdisp->disp_xoffset);
|
||||
hruler->upper -= UNSCALEX (gdisp, (double) gdisp->disp_xoffset);
|
||||
hruler->lower -= img2real(gdisp, TRUE,
|
||||
FUNSCALEX(gdisp,(double) gdisp->disp_xoffset));
|
||||
hruler->upper -= img2real(gdisp, TRUE,
|
||||
FUNSCALEX(gdisp,(double) gdisp->disp_xoffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdisp->disp_xoffset = 0;
|
||||
hruler->lower += UNSCALEX (gdisp, (double) gdisp->offset_x);
|
||||
hruler->upper += UNSCALEX (gdisp, (double) gdisp->offset_x);
|
||||
hruler->lower += img2real (gdisp, TRUE,
|
||||
FUNSCALEX (gdisp, (double) gdisp->offset_x));
|
||||
hruler->upper += img2real (gdisp, TRUE,
|
||||
FUNSCALEX (gdisp, (double) gdisp->offset_x));
|
||||
}
|
||||
|
||||
if (sy < gdisp->disp_height)
|
||||
{
|
||||
gdisp->disp_yoffset = (gdisp->disp_height - sy) / 2;
|
||||
vruler->lower -= UNSCALEY (gdisp, (double) gdisp->disp_yoffset);
|
||||
vruler->upper -= UNSCALEY (gdisp, (double) gdisp->disp_yoffset);
|
||||
vruler->lower -= img2real(gdisp, FALSE,
|
||||
FUNSCALEY(gdisp,(double) gdisp->disp_yoffset));
|
||||
vruler->upper -= img2real(gdisp, FALSE,
|
||||
FUNSCALEY(gdisp,(double) gdisp->disp_yoffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
gdisp->disp_yoffset = 0;
|
||||
vruler->lower += UNSCALEY (gdisp, (double) gdisp->offset_y);
|
||||
vruler->upper += UNSCALEY (gdisp, (double) gdisp->offset_y);
|
||||
vruler->lower += img2real (gdisp, FALSE,
|
||||
FUNSCALEY (gdisp, (double) gdisp->offset_y));
|
||||
vruler->upper += img2real (gdisp, FALSE,
|
||||
FUNSCALEY (gdisp, (double) gdisp->offset_y));
|
||||
}
|
||||
|
||||
gtk_widget_draw (GTK_WIDGET (hruler), NULL);
|
||||
|
|
|
@ -192,11 +192,11 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPaths to search for brushes, palettes, gradients\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tpatterns, and plug-ins are also configured here.\n"), -1);
|
||||
_("\t\tpatterns, plug-ins and modules are also configured here.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("pluginrc\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tPlug-ins and extensions are extern programs run by\n"), -1);
|
||||
_("\t\tPlug-ins and extensions are external programs run by\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tthe GIMP which provide additional functionality.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -299,6 +299,18 @@ install_help (InstallCallback callback)
|
|||
_("\t\twide GIMP plug-in directories when searching for\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tplug-ins.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("modules\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThis subdirectory can be used to store user created,\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\ttemporary, or otherwise non-system-supported DLL modules. \n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tThe default gimprc file checks this subdirectory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tin addition to the system-wide GIMP module directory\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\twhen searching for modules to load when initialising.\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font_emphasis, NULL, NULL,
|
||||
_("scripts\n"), -1);
|
||||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
|
@ -322,6 +334,9 @@ install_help (InstallCallback callback)
|
|||
gtk_text_insert (GTK_TEXT (text), font, NULL, NULL,
|
||||
_("\t\tGIMP sessions and can be destroyed with impunity.\n"), -1);
|
||||
|
||||
/* scroll back to the top */
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (vadj), 0.0);
|
||||
|
||||
gtk_widget_show (vsb);
|
||||
gtk_widget_show (text);
|
||||
gtk_widget_show (table);
|
||||
|
@ -389,7 +404,7 @@ install_run (InstallCallback callback)
|
|||
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
|
||||
vsb = gtk_vscrollbar_new (vadj);
|
||||
text = gtk_text_new (NULL, vadj);
|
||||
gtk_widget_set_usize (text, 384, 256);
|
||||
gtk_widget_set_usize (text, 384, 356);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
|
||||
|
@ -447,6 +462,8 @@ install_run (InstallCallback callback)
|
|||
g_snprintf (buffer, sizeof(buffer), "%s/user_install %s %s",
|
||||
DATADIR, DATADIR, gimp_directory ());
|
||||
|
||||
/* urk - should really use something better than popen(), since
|
||||
* we can't tell if the installation script failed --austin */
|
||||
if ((pfp = popen (buffer, "r")) != NULL)
|
||||
{
|
||||
while (fgets (buffer, 2048, pfp))
|
||||
|
|
|
@ -29,6 +29,8 @@ echo "mkdir $2/patterns"
|
|||
mkdir $2/patterns
|
||||
echo "mkdir $2/plug-ins"
|
||||
mkdir $2/plug-ins
|
||||
echo "mkdir $2/modules"
|
||||
mkdir $2/modules
|
||||
echo "mkdir $2/gfig"
|
||||
mkdir $2/gfig
|
||||
echo "mkdir $2/tmp"
|
||||
|
|
|
@ -14,6 +14,7 @@ It does not need to concern users.
|
|||
*** PREFIXES:
|
||||
|
||||
"tiff" : The standard GIMP TIFF plugin
|
||||
"jpeg" : The standard GIMP JPEG plugin
|
||||
"gimp" : For common and standard parasites
|
||||
|
||||
|
||||
|
@ -24,10 +25,15 @@ It does not need to concern users.
|
|||
human-readable text in unspecified 8-bit ASCII. It
|
||||
includes a trailing \0 string terminator. The size
|
||||
of the parasite data may not exceed 241 bytes.
|
||||
This parasite attaches to images only.
|
||||
This parasite attaches to images only. It is
|
||||
persistent, which means it is saved in XCF files.
|
||||
|
||||
"tiff-save-options" : The TiffSaveVals structure from the TIFF plugin.
|
||||
This parasite attaches to images only.
|
||||
This parasite attaches to images only. It is
|
||||
not persistent.
|
||||
|
||||
"jpeg-save-options" : The JpegSaveVals structure from the JPEG
|
||||
plugin. This parasite attaches to images only.
|
||||
It is not persistent.
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
|
|
@ -29,6 +29,8 @@ echo "mkdir $2/patterns"
|
|||
mkdir $2/patterns
|
||||
echo "mkdir $2/plug-ins"
|
||||
mkdir $2/plug-ins
|
||||
echo "mkdir $2/modules"
|
||||
mkdir $2/modules
|
||||
echo "mkdir $2/gfig"
|
||||
mkdir $2/gfig
|
||||
echo "mkdir $2/tmp"
|
||||
|
|
Loading…
Reference in New Issue