1997-11-25 06:05:25 +08:00
/* The GIMP -- an image manipulation program
* Copyright ( C ) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later version .
*
* This program 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 General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
1998-04-13 13:44:11 +08:00
* Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
1997-11-25 06:05:25 +08:00
*/
1999-03-07 20:56:03 +08:00
# include "config.h"
Check for mmap.
* configure.in: Check for mmap.
* app/makefile.msc: Depend on gimpi.lib.
* app/app_procs.c (app_init): Fix gccism: Allocate filenames (an
array with non-constant size) dynamically.
* app/{datafiles,fileops,general,install,module_db,temp_buf}.c:
Include glib.h before standard headers, because of certain obscure
details related to compiling with gcc on Win32.
(If you really want to know: glib.h defines he names of POSIXish
(but non-ANSI) functions as prefixed with underscore, because
that's how they are named in the msvcrt runtime C library we want
to use. However, defining stat as _stat causes some problems if
done after including the mingw32 <sys/stat.h>. So, it's easiest to
include <glib.h> early.)
* app/main.c: Use _stdcall and __argc, __argv with MSC, but
__attribute__((stdcall)) and _argc, _argv with gcc. Don't print
the "Passed serialization test" message on Win32. (It would open
up an otherwise unnecessary console window.)
* app/paint_funcs.c (gaussian_blur_region): Don't use variable sum
until initialized.
* app/{bezier_select,paths_dialog}.c: Include config.h and define
rint() if necessary.
* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
1999-05-29 01:47:17 +08:00
# include <glib.h>
1997-11-25 06:05:25 +08:00
# include <stdio.h>
# include <stdlib.h>
1999-04-28 22:33:06 +08:00
# include <sys/types.h>
1997-11-25 06:05:25 +08:00
# include <sys/stat.h>
1999-03-07 20:56:03 +08:00
# ifdef HAVE_UNISTD_H
1997-11-25 06:05:25 +08:00
# include <unistd.h>
1999-03-07 20:56:03 +08:00
# endif
1997-11-25 06:05:25 +08:00
# include "appenv.h"
# include "actionarea.h"
# include "install.h"
# include "interface.h"
# include "gimprc.h"
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
# include "libgimp/gimpintl.h"
1999-03-07 20:56:03 +08:00
# include "libgimp/gimpenv.h"
# ifndef NATIVE_WIN32
1999-04-28 22:33:06 +08:00
# ifndef __EMX__
1999-03-07 20:56:03 +08:00
# define USER_INSTALL "user_install"
1999-04-28 22:33:06 +08:00
# else
# include <process.h>
# define USER_INSTALL "user_install.cmd"
# endif
1999-03-07 20:56:03 +08:00
# else
# define STRICT
# include <windows.h>
# define USER_INSTALL "user_install.bat"
# endif
1997-11-25 06:05:25 +08:00
static void install_run ( InstallCallback ) ;
static void install_help ( InstallCallback ) ;
static void help_install_callback ( GtkWidget * , gpointer ) ;
static void help_ignore_callback ( GtkWidget * , gpointer ) ;
static void help_quit_callback ( GtkWidget * , gpointer ) ;
static void install_continue_callback ( GtkWidget * , gpointer ) ;
static void install_quit_callback ( GtkWidget * , gpointer ) ;
static GtkWidget * help_widget ;
static GtkWidget * install_widget ;
void
install_verify ( InstallCallback install_callback )
{
int properly_installed = TRUE ;
char * filename ;
struct stat stat_buf ;
filename = gimp_directory ( ) ;
1999-03-07 20:56:03 +08:00
/* gimp_directory now always returns something */
1997-11-25 06:05:25 +08:00
if ( stat ( filename , & stat_buf ) ! = 0 )
properly_installed = FALSE ;
/* If there is already a proper installation, invoke the callback */
if ( properly_installed )
{
( * install_callback ) ( ) ;
}
/* Otherwise, prepare for installation */
else if ( no_interface )
{
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
g_print ( _ ( " The GIMP is not properly installed for the current user \n " ) ) ;
g_print ( _ ( " User installation was skipped because the '--nointerface' flag was encountered \n " ) ) ;
g_print ( _ ( " To perform user installation, run the GIMP without the '--nointerface' flag \n " ) ) ;
1997-11-25 06:05:25 +08:00
( * install_callback ) ( ) ;
}
else
{
install_help ( install_callback ) ;
}
}
/*********************/
/* Local functions */
static void
install_help ( InstallCallback callback )
{
static ActionAreaItem action_items [ ] =
{
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
{ N_ ( " Install " ) , help_install_callback , NULL , NULL } ,
{ N_ ( " Ignore " ) , help_ignore_callback , NULL , NULL } ,
{ N_ ( " Quit " ) , help_quit_callback , NULL , NULL }
1997-11-25 06:05:25 +08:00
} ;
GtkWidget * text ;
GtkWidget * table ;
GtkWidget * vsb ;
GtkAdjustment * vadj ;
GdkFont * font_strong ;
GdkFont * font_emphasis ;
GdkFont * font ;
1999-03-26 07:14:36 +08:00
static const struct {
gint font ;
char * text ;
} help_lines [ ] = {
{ 2 , N_ ( " The GIMP - GNU Image Manipulation Program \n \n " ) } ,
{ 1 , N_ ( " Copyright (C) 1995 Spencer Kimball and Peter Mattis \n " ) } ,
{ 0 , " \n " } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ (
" This program is free software; you can redistribute it and/or modify \n "
" it under the terms of the GNU General Public License as published by \n "
" the Free Software Foundation; either version 2 of the License, or \n "
" (at your option) any later version. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 0 , " \n " } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ (
" This program is distributed in the hope that it will be useful, \n "
" but WITHOUT ANY WARRANTY; without even the implied warranty of \n "
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n "
" See the GNU General Public License for more details. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 0 , " \n " } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ (
" You should have received a copy of the GNU General Public License \n "
" along with this program; if not, write to the Free Software \n "
" Foundation, Inc., 59 Temple Place - Suite 330, Boston, \n "
" MA 02111-1307, USA. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 0 , " \n \n " } ,
{ 2 , N_ ( " Personal GIMP Installation \n \n " ) } ,
{ 0 , N_ ( " For a proper GIMP installation, a subdirectory called \n " ) } ,
{ 1 , NULL } , /* will be replaced with gimp_directory() */
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " needs to be created. This \n "
" subdirectory will contain a number of important files: \n \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " gimprc \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t The gimprc is used to store personal preferences \n "
" \t \t such as default GIMP behaviors & plug-in hotkeys. \n "
" \t \t Paths to search for brushes, palettes, gradients \n "
" \t \t patterns, plug-ins and modules are also configured here. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " unitrc \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t The unitrc is used to store your user units database. \n "
" \t \t You can define additional units and use them just \n "
" \t \t like you use the built-in units inches, millimeters, \n "
" \t \t points and picas. This file is overwritten each time \n "
" \t \t you quit the GIMP. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " pluginrc \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t Plug-ins and extensions are external programs run by \n "
" \t \t the GIMP which provide additional functionality. \n "
" \t \t These programs are searched for at run-time and \n "
" \t \t information about their functionality and mod-times \n "
" \t \t is cached in this file. This file is intended to \n "
" \t \t be GIMP-readable only, and should not be edited. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " brushes \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user defined brushes. The default gimprc file \n "
" \t \t checks this subdirectory in addition to the system- \n "
" \t \t wide gimp brushes installation when searching for \n "
" \t \t brushes. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " gradients \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n \t \t user defined gradients. The default gimprc file \n \t \t checks this subdirectory in addition to the system- \n \t \t wide gimp gradients installation when searching for \n \t \t gradients. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " gfig \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user defined figures to be used by the gfig plug-in. \n "
" \t \t The default gimprc file checks this subdirectory in \n "
" \t \t addition to the systemwide gimp gfig installation \n "
" \t \t when searching for gfig figures. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " gflares \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user defined gflares to be used by the gflare plug-in. \n "
" \t \t The default gimprc file checks this subdirectory in \n "
" \t \t addition to the systemwide gimp gflares installation \n "
" \t \t when searching for gflares. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " fractalexplorer \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user defined fractals to be used by the FractalExplorer plug-in. \n "
" \t \t The default gimprc file checks this subdirectory in \n "
" \t \t addition to the systemwide gimp FractalExplorer installation \n "
" \t \t when searching for fractals. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " palettes \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user defined palettes. The default gimprc file \n "
" \t \t checks only this subdirectory (not the system-wide \n "
" \t \t installation) when searching for palettes. During \n "
" \t \t installation, the system palettes will be copied \n "
" \t \t here. This is done to allow modifications made to \n "
" \t \t palettes during GIMP execution to persist across \n "
" \t \t sessions. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " patterns \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user defined patterns. The default gimprc file \n "
" \t \t checks this subdirectory in addition to the system- \n "
" \t \t wide gimp patterns installation when searching for \n "
" \t \t patterns. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " plug-ins \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This is a subdirectory which can be used to store \n "
" \t \t user created, temporary, or otherwise non-system- \n "
" \t \t supported plug-ins. The default gimprc file \n "
" \t \t checks this subdirectory in addition to the system- \n "
" \t \t wide GIMP plug-in directories when searching for \n "
" \t \t plug-ins. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " modules \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This subdirectory can be used to store user created, \n "
" \t \t temporary, or otherwise non-system-supported DLL modules. \n "
" \t \t The default gimprc file checks this subdirectory \n "
" \t \t in addition to the system-wide GIMP module directory \n "
" \t \t when searching for modules to load when initialising. \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " scripts \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This subdirectory is used by the GIMP to store \n "
" \t \t user created and installed scripts. The default gimprc \n "
" \t \t file checks this subdirectory in addition to the system \n "
" \t \t -wide gimp scripts subdirectory when searching for scripts \n " ) } ,
1999-03-26 07:14:36 +08:00
{ 1 , N_ ( " tmp \n " ) } ,
1999-05-30 00:35:47 +08:00
{ 0 , N_ ( " \t \t This subdirectory is used by the GIMP to temporarily \n "
" \t \t store undo buffers to reduce memory usage. If GIMP is \n "
" \t \t unceremoniously killed, files may persist in this directory \n "
" \t \t of the form: gimp<#>.<#>. These files are useless across \n "
" \t \t GIMP sessions and can be destroyed with impunity. \n " ) }
1999-03-26 07:14:36 +08:00
} ;
gint nhelp_lines = sizeof ( help_lines ) / sizeof ( help_lines [ 0 ] ) ;
gint i ;
1997-11-25 06:05:25 +08:00
help_widget = gtk_dialog_new ( ) ;
1998-03-13 06:01:43 +08:00
gtk_signal_connect ( GTK_OBJECT ( help_widget ) , " delete_event " ,
GTK_SIGNAL_FUNC ( gtk_true ) ,
NULL ) ;
1998-01-26 06:13:00 +08:00
gtk_window_set_wmclass ( GTK_WINDOW ( help_widget ) , " gimp_installation " , " Gimp " ) ;
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
gtk_window_set_title ( GTK_WINDOW ( help_widget ) , _ ( " GIMP Installation " ) ) ;
1997-11-25 06:05:25 +08:00
gtk_window_position ( GTK_WINDOW ( help_widget ) , GTK_WIN_POS_CENTER ) ;
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_text_set_editable ( GTK_TEXT ( text ) , FALSE ) ;
1998-01-07 06:09:30 +08:00
gtk_widget_set_usize ( text , 450 , 475 ) ;
1997-11-25 06:05:25 +08:00
table = gtk_table_new ( 1 , 2 , FALSE ) ;
gtk_table_set_col_spacing ( GTK_TABLE ( table ) , 0 , 2 ) ;
action_items [ 0 ] . user_data = ( void * ) callback ;
action_items [ 1 ] . user_data = ( void * ) callback ;
action_items [ 2 ] . user_data = ( void * ) callback ;
build_action_area ( GTK_DIALOG ( help_widget ) , action_items , 3 , 0 ) ;
gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( help_widget ) - > vbox ) , table , TRUE , TRUE , 0 ) ;
gtk_table_attach ( GTK_TABLE ( table ) , vsb , 1 , 2 , 0 , 1 ,
0 , GTK_EXPAND | GTK_SHRINK | GTK_FILL , 0 , 0 ) ;
gtk_table_attach ( GTK_TABLE ( table ) , text , 0 , 1 , 0 , 1 ,
GTK_EXPAND | GTK_SHRINK | GTK_FILL ,
GTK_EXPAND | GTK_SHRINK | GTK_FILL , 0 , 0 ) ;
gtk_container_border_width ( GTK_CONTAINER ( table ) , 2 ) ;
font_strong = gdk_font_load ( " -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-*-* " ) ;
font_emphasis = gdk_font_load ( " -*-helvetica-medium-o-normal-*-*-100-*-*-*-*-*-* " ) ;
font = gdk_font_load ( " -*-helvetica-medium-r-normal-*-*-100-*-*-*-*-*-* " ) ;
/* Realize the widget before allowing new text to be inserted */
gtk_widget_realize ( text ) ;
1999-03-26 07:14:36 +08:00
for ( i = 0 ; i < nhelp_lines ; i + + )
if ( help_lines [ i ] . text = = NULL )
/* inserting gimp_directory () this way is a little ugly */
gtk_text_insert ( GTK_TEXT ( text ) ,
( help_lines [ i ] . font = = 2 ) ? font_strong :
( help_lines [ i ] . font = = 1 ) ? font_emphasis : font ,
NULL , NULL ,
gimp_directory ( ) , - 1 ) ;
else
gtk_text_insert ( GTK_TEXT ( text ) ,
( help_lines [ i ] . font = = 2 ) ? font_strong :
( help_lines [ i ] . font = = 1 ) ? font_emphasis : font ,
NULL , NULL ,
gettext ( help_lines [ i ] . text ) , - 1 ) ;
1997-11-25 06:05:25 +08:00
1999-01-26 05:11:44 +08:00
/* scroll back to the top */
gtk_adjustment_set_value ( GTK_ADJUSTMENT ( vadj ) , 0.0 ) ;
1997-11-25 06:05:25 +08:00
gtk_widget_show ( vsb ) ;
gtk_widget_show ( text ) ;
gtk_widget_show ( table ) ;
gtk_widget_show ( help_widget ) ;
}
static void
help_install_callback ( GtkWidget * w ,
gpointer client_data )
{
InstallCallback callback ;
callback = ( InstallCallback ) client_data ;
gtk_widget_destroy ( help_widget ) ;
install_run ( callback ) ;
}
static void
help_ignore_callback ( GtkWidget * w ,
gpointer client_data )
{
InstallCallback callback ;
callback = ( InstallCallback ) client_data ;
gtk_widget_destroy ( help_widget ) ;
( * callback ) ( ) ;
}
static void
help_quit_callback ( GtkWidget * w ,
gpointer client_data )
{
gtk_widget_destroy ( help_widget ) ;
gtk_exit ( 0 ) ;
}
1999-03-07 20:56:03 +08:00
# ifdef NATIVE_WIN32
static char *
quote_spaces ( char * string )
{
int nspaces = 0 ;
char * p = string , * q , * new ;
while ( * p )
{
if ( * p = = ' ' )
nspaces + + ;
p + + ;
}
if ( nspaces = = 0 )
return g_strdup ( string ) ;
new = g_malloc ( strlen ( string ) + nspaces * 2 + 1 ) ;
p = string ;
q = new ;
while ( * p )
{
if ( * p = = ' ' )
{
* q + + = ' " ' ;
* q + + = ' ' ;
* q + + = ' " ' ;
}
else
* q + + = * p ;
p + + ;
}
* q = ' \0 ' ;
return new ;
}
# endif
1997-11-25 06:05:25 +08:00
static void
install_run ( InstallCallback callback )
{
static ActionAreaItem action_items [ ] =
{
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
{ N_ ( " Continue " ) , install_continue_callback , NULL , NULL } ,
{ N_ ( " Quit " ) , install_quit_callback , NULL , NULL }
1997-11-25 06:05:25 +08:00
} ;
GtkWidget * text ;
GtkWidget * table ;
GtkWidget * vsb ;
GtkAdjustment * vadj ;
GdkFont * font_strong ;
GdkFont * font ;
FILE * pfp ;
char buffer [ 2048 ] ;
struct stat stat_buf ;
int err ;
int executable = TRUE ;
install_widget = gtk_dialog_new ( ) ;
1998-03-13 06:01:43 +08:00
gtk_signal_connect ( GTK_OBJECT ( install_widget ) , " delete_event " ,
GTK_SIGNAL_FUNC ( gtk_true ) ,
NULL ) ;
1998-01-26 06:13:00 +08:00
gtk_window_set_wmclass ( GTK_WINDOW ( install_widget ) , " installation_log " , " Gimp " ) ;
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
gtk_window_set_title ( GTK_WINDOW ( install_widget ) , _ ( " Installation Log " ) ) ;
1997-11-25 06:05:25 +08:00
gtk_window_position ( GTK_WINDOW ( install_widget ) , GTK_WIN_POS_CENTER ) ;
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 ) ;
1999-01-26 05:11:44 +08:00
gtk_widget_set_usize ( text , 384 , 356 ) ;
1997-11-25 06:05:25 +08:00
table = gtk_table_new ( 1 , 2 , FALSE ) ;
gtk_table_set_col_spacing ( GTK_TABLE ( table ) , 0 , 2 ) ;
action_items [ 0 ] . user_data = ( void * ) callback ;
action_items [ 1 ] . user_data = ( void * ) callback ;
build_action_area ( GTK_DIALOG ( install_widget ) , action_items , 2 , 0 ) ;
gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( install_widget ) - > vbox ) , table , TRUE , TRUE , 0 ) ;
gtk_table_attach ( GTK_TABLE ( table ) , vsb , 1 , 2 , 0 , 1 ,
GTK_FILL , GTK_EXPAND | GTK_SHRINK | GTK_FILL , 0 , 0 ) ;
gtk_table_attach ( GTK_TABLE ( table ) , text , 0 , 1 , 0 , 1 ,
GTK_EXPAND | GTK_SHRINK | GTK_FILL ,
GTK_EXPAND | GTK_SHRINK | GTK_FILL ,
0 , 0 ) ;
gtk_container_border_width ( GTK_CONTAINER ( table ) , 2 ) ;
font_strong = gdk_font_load ( " -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-*-* " ) ;
font = gdk_font_load ( " -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-*-* " ) ;
/* Realize the text widget before inserting text strings */
gtk_widget_realize ( text ) ;
1999-03-07 20:56:03 +08:00
# ifndef NATIVE_WIN32
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
gtk_text_insert ( GTK_TEXT ( text ) , font_strong , NULL , NULL , _ ( " User Installation Log \n \n " ) , - 1 ) ;
1999-03-07 20:56:03 +08:00
# endif
1997-11-25 06:05:25 +08:00
/* Generate output */
1999-03-07 20:56:03 +08:00
g_snprintf ( buffer , sizeof ( buffer ) , " %s " G_DIR_SEPARATOR_S USER_INSTALL ,
gimp_data_directory ( ) ) ;
1997-11-25 06:05:25 +08:00
if ( ( err = stat ( buffer , & stat_buf ) ) ! = 0 )
{
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL , buffer , - 1 ) ;
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL ,
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
_ ( " does not exist. Cannot install. \n " ) , - 1 ) ;
1997-11-25 06:05:25 +08:00
executable = FALSE ;
}
1999-03-07 20:56:03 +08:00
# ifdef S_IXUSR
1997-11-25 06:05:25 +08:00
else if ( ! ( S_IXUSR & stat_buf . st_mode ) | | ! ( S_IRUSR & stat_buf . st_mode ) )
{
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL , buffer , - 1 ) ;
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL ,
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
_ ( " has invalid permissions. \n Cannot install. " ) , - 1 ) ;
1997-11-25 06:05:25 +08:00
executable = FALSE ;
}
1999-03-07 20:56:03 +08:00
# endif
1997-11-25 06:05:25 +08:00
if ( executable = = TRUE )
{
1999-03-07 20:56:03 +08:00
# ifdef NATIVE_WIN32
char * quoted_data_dir , * quoted_user_dir ;
/* On Windows, it is common for the GIMP data directory
* to have spaces in it ( " c: \ Program Files \ GIMP " ) . Put spaces in quotes .
*/
quoted_data_dir = quote_spaces ( gimp_data_directory ( ) ) ;
quoted_user_dir = quote_spaces ( gimp_directory ( ) ) ;
/* The Microsoft _popen doesn't work in Windows applications, sigh.
* Do the installation by calling system ( ) . The user_install . bat
* ends with a pause command , so the user has to press enter in
* the console window to continue , and thus has a chance to read
* at the window contents .
*/
AllocConsole ( ) ;
g_snprintf ( buffer , sizeof ( buffer ) , " %s " G_DIR_SEPARATOR_S USER_INSTALL " %s %s " ,
quoted_data_dir , quoted_data_dir ,
quoted_user_dir ) ;
if ( system ( buffer ) = = - 1 )
executable = FALSE ;
g_free ( quoted_data_dir ) ;
g_free ( quoted_user_dir ) ;
gtk_text_insert ( GTK_TEXT ( text ) , font_strong , NULL , NULL ,
" Did you notice any error messages \n "
" in the console window? If not, installation \n "
" was successful! Otherwise, quit and investigate \n "
" the possible reason... \n " , - 1 ) ;
# else
1999-04-28 22:33:06 +08:00
# ifndef __EMX__
1999-03-07 20:56:03 +08:00
g_snprintf ( buffer , sizeof ( buffer ) , " %s " G_DIR_SEPARATOR_S USER_INSTALL " %s %s " ,
gimp_data_directory ( ) , gimp_data_directory ( ) ,
gimp_directory ( ) ) ;
1999-04-28 22:33:06 +08:00
# else
g_snprintf ( buffer , sizeof ( buffer ) , " cmd.exe /c %s " G_DIR_SEPARATOR_S USER_INSTALL " %s %s " ,
gimp_data_directory ( ) , gimp_data_directory ( ) ,
gimp_directory ( ) ) ;
{
char * s = buffer + 10 ;
while ( * s )
{
if ( * s = = ' / ' ) * s = ' \\ ' ;
s + + ;
}
}
# endif
1998-10-10 15:49:59 +08:00
1999-01-26 05:11:44 +08:00
/* urk - should really use something better than popen(), since
* we can ' t tell if the installation script failed - - austin */
1997-11-25 06:05:25 +08:00
if ( ( pfp = popen ( buffer , " r " ) ) ! = NULL )
{
1999-03-07 20:56:03 +08:00
while ( fgets ( buffer , sizeof ( buffer ) , pfp ) )
1997-11-25 06:05:25 +08:00
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL , buffer , - 1 ) ;
pclose ( pfp ) ;
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL ,
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
_ ( " \n Installation successful! \n " ) , - 1 ) ;
1997-11-25 06:05:25 +08:00
}
else
executable = FALSE ;
1999-03-07 20:56:03 +08:00
# endif /* !NATIVE_WIN32 */
1999-03-09 05:59:55 +08:00
}
1999-03-07 20:56:03 +08:00
1997-11-25 06:05:25 +08:00
if ( executable = = FALSE )
gtk_text_insert ( GTK_TEXT ( text ) , font , NULL , NULL ,
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
_ ( " \n Installation failed. Contact system administrator. \n " ) , - 1 ) ;
1997-11-25 06:05:25 +08:00
gtk_widget_show ( vsb ) ;
gtk_widget_show ( text ) ;
gtk_widget_show ( table ) ;
gtk_widget_show ( install_widget ) ;
}
static void
install_continue_callback ( GtkWidget * w ,
gpointer client_data )
{
InstallCallback callback ;
1999-03-07 20:56:03 +08:00
# ifdef NATIVE_WIN32
FreeConsole ( ) ;
# endif
1997-11-25 06:05:25 +08:00
callback = ( InstallCallback ) client_data ;
gtk_widget_destroy ( install_widget ) ;
( * callback ) ( ) ;
}
static void
install_quit_callback ( GtkWidget * w ,
gpointer client_data )
{
gtk_widget_destroy ( install_widget ) ;
gtk_exit ( 0 ) ;
}