~ubuntu-branches/ubuntu/vivid/nip2/vivid-proposed

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2009-05-12 09:26:46 UTC
  • mfrom: (1.2.11 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090512092646-j8lb1w2x69pvgma4
Tags: 7.18.1-1ubuntu1
* Merge from debian unstable (LP: #375435), remaining changes:
  - debian/control: Also Recommend abrowser

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#define DEBUG
34
34
 */
35
35
 
 
36
/* Show all paint actions with flashing stuff.
 
37
#define DEBUG_UPDATES
 
38
 */
 
39
 
36
40
/* Stop startup creation of externs for all VIPS functions etc.
37
41
#define DEBUG_NOAUTO
38
42
 */
39
43
 
40
 
/* stop on any gtk error/warning/whatever
 
44
/* Stop on any gtk error/warning/whatever. Usually set by configure for dev
 
45
 * builds. 
41
46
#define DEBUG_FATAL
42
47
 */
43
48
 
 
49
/* But some themes can trigger warnings, argh, so sometimes we need to
 
50
 * undef it. VipsObject sets can also trigger warnings.
 
51
 */
 
52
#undef DEBUG_FATAL
 
53
 
44
54
/* Time startup.
45
55
#define DEBUG_TIME
46
56
 */
93
103
static gboolean main_option_print_main = FALSE;
94
104
static gboolean main_option_version = FALSE;
95
105
static gboolean main_option_verbose = FALSE;
 
106
static gboolean main_option_test = FALSE;
 
107
static char *main_option_prefix = NULL;
96
108
 
97
109
static GOptionEntry main_option[] = {
98
110
        { "expression", 'e', 0, G_OPTION_ARG_STRING, &main_option_expression, 
113
125
                &main_option_no_load_menus, 
114
126
                N_( "don't load menu definitions" ), NULL },
115
127
        { "no-load-args", 'a', 0, G_OPTION_ARG_NONE, &main_option_no_load_args, 
116
 
                N_( "don't try to load extra cmd-line args as files" ), NULL },
 
128
                N_( "don't try to load command-line arguments" ), NULL },
117
129
        { "stdin-ws", 'w', 0, G_OPTION_ARG_NONE, &main_option_stdin_ws, 
118
130
                N_( "load stdin as a workspace" ), NULL },
119
131
        { "stdin-def", 'd', 0, G_OPTION_ARG_NONE, &main_option_stdin_def, 
127
139
        { "time-save", 't', 0, G_OPTION_ARG_NONE, &main_option_time_save, 
128
140
                N_( "time image save operations" ), 
129
141
                NULL },
 
142
        { "prefix", 'x', 0, G_OPTION_ARG_FILENAME, &main_option_prefix, 
 
143
                N_( "start as if installed to PREFIX" ), "PREFIX" },
130
144
        { "i18n", 'i', 0, G_OPTION_ARG_NONE, &main_option_i18n, 
131
145
                N_( "output strings for internationalisation" ), 
132
146
                NULL },
133
147
        { "version", 'v', 0, G_OPTION_ARG_NONE, &main_option_version, 
134
148
                N_( "print version number" ), 
135
149
                NULL },
 
150
        { "test", 'T', 0, G_OPTION_ARG_NONE, &main_option_test, 
 
151
                N_( "test for errors and quit" ), NULL },
136
152
        { NULL }
137
153
};
138
154
 
139
155
/* Accumulate startup errors here.
140
156
 */
141
157
static char main_start_error_txt[MAX_STRSIZE];
142
 
static BufInfo main_start_error = 
143
 
        BUF_STATIC( main_start_error_txt, MAX_STRSIZE );
 
158
static VipsBuf main_start_error = 
 
159
        VIPS_BUF_STATIC( main_start_error_txt, MAX_STRSIZE );
144
160
 
145
161
static void
146
162
main_log_add( const char *fmt, ... )
148
164
        va_list ap;
149
165
 
150
166
        va_start( ap, fmt );
151
 
        buf_vappendf( &main_start_error, fmt, ap );
 
167
        vips_buf_vappendf( &main_start_error, fmt, ap );
152
168
        va_end( ap );
153
169
}
154
170
 
155
171
static const char *
156
172
main_log_get( void )
157
173
{
158
 
        return( buf_all( &main_start_error ) );
 
174
        return( vips_buf_all( &main_start_error ) );
159
175
}
160
176
 
161
177
static gboolean
162
178
main_log_is_empty( void )
163
179
{
164
 
        return( buf_is_empty( &main_start_error ) );
 
180
        return( vips_buf_is_empty( &main_start_error ) );
165
181
}
166
182
 
167
183
/* NULL log handler. Used to suppress output on win32 without DEBUG_FATAL.
191
207
                error_get_top(), error_get_sub() );
192
208
 
193
209
        if( main_option_verbose ) {
194
 
                BufInfo buf;
 
210
                VipsBuf buf;
195
211
                char txt[MAX_STRSIZE];
196
212
 
197
 
                buf_init_static( &buf, txt, MAX_STRSIZE );
 
213
                vips_buf_init_static( &buf, txt, MAX_STRSIZE );
198
214
                slist_map( expr_error_all,
199
215
                        (SListMapFn) expr_error_print, &buf );
200
 
                fprintf( stderr, "%s\n", buf_all( &buf ) );
 
216
                fprintf( stderr, "%s\n", vips_buf_all( &buf ) );
201
217
        }
202
218
 
203
219
        exit( 1 );
220
236
                char filename[FILENAME_MAX];
221
237
 
222
238
                im_strncpy( filename, main_option_output, FILENAME_MAX );
223
 
                if( save_objects( root, filename ) )
224
 
                        main_error_exit( _( "error calculating \"%s\"" ), 
 
239
                if( !group_save_item( root, filename ) )
 
240
                        main_error_exit( _( "error saving \"%s\"" ), 
225
241
                                symbol_name( sym ) );
226
242
        }
227
243
 
357
373
static void
358
374
main_quit_test_cb( void *sys, iWindowResult result )
359
375
{
360
 
        if( result == IWINDOW_TRUE )
 
376
        if( result == IWINDOW_YES )
361
377
                /* No return from this.
362
378
                 */
363
379
                main_quit();
386
402
                get_savedir(), NO_SPLASH ) );
387
403
}
388
404
 
389
 
void
390
 
main_splash_update( const char *fmt, ... )
391
 
{
392
 
        if( main_splash ) {
393
 
                va_list ap;
394
 
 
395
 
                va_start( ap, fmt );
396
 
                splash_updatev( main_splash, fmt, ap );
397
 
                va_end( ap );
398
 
        }
399
 
 
400
 
        animate_hourglass();
401
 
}
402
 
 
403
405
static void
404
406
main_watchgroup_changed_cb( void )
405
407
{
418
420
{
419
421
        Workspace *new_ws;
420
422
 
421
 
        main_splash_update( _( "Loading \"%s\"" ), im_skip_dir( filename ) );
422
 
 
423
423
        if( (new_ws = 
424
424
                workspace_new_from_file( main_workspacegroup, filename )) ) {
425
425
                Mainw *new_mainw;
477
477
        Toolkit *kit;
478
478
 
479
479
        if( !main_option_no_load_menus || im_skip_dir( filename )[0] == '_' ) {
480
 
                main_splash_update( _( "Loading toolkit \"%s\"" ), 
481
 
                        im_skip_dir( filename ) );
 
480
                progress_update_loading( 0, im_skip_dir( filename ) );
482
481
 
483
482
                if( !(kit = toolkit_new_from_file( main_toolkitgroup, 
484
483
                        filename )) )
499
498
        printf( "main_load_ws: %s\n", filename );
500
499
#endif/*DEBUG*/
501
500
 
502
 
        main_splash_update( _( "Loading workspace \"%s\"" ), 
503
 
                im_skip_dir( filename ) );
 
501
        progress_update_loading( 0, im_skip_dir( filename ) );
504
502
 
505
503
        if( !(ws = workspace_new_from_file( main_workspacegroup, filename )) ) 
506
504
                box_alert( NULL );
530
528
 
531
529
                        sym = symbol_new( symbol_root->expr->compile,
532
530
                                pack->table[i]->name );
533
 
                        assert( sym->type == SYM_ZOMBIE );
 
531
                        g_assert( sym->type == SYM_ZOMBIE );
534
532
                        sym->type = SYM_EXTERNAL;
535
533
                        sym->function = pack->table[i];
536
534
                        sym->fn_nargs = vips_n_args( pack->table[i] );
572
570
        printf( "plug-ins init\n" );
573
571
#endif/*DEBUG*/
574
572
 
575
 
        main_splash_update( "%s", _( "Loading plugins" ) );
576
 
 
577
573
        /* Load any plug-ins on PATH_START. 
578
574
         */
579
575
        (void) path_map_exact( PATH_START, "*.plg", 
604
600
static void *
605
601
main_junk_auto_load( Filemodel *filemodel )
606
602
{
607
 
        assert( IS_FILEMODEL( filemodel ) );
 
603
        g_assert( IS_FILEMODEL( filemodel ) );
608
604
 
609
605
        if( filemodel->auto_load )
610
606
                IDESTROY( filemodel );
617
613
void
618
614
main_reload( void )
619
615
{
620
 
        set_hourglass();
 
616
        progress_begin();
621
617
 
622
618
        /* Remove.
623
619
         */
635
631
         */
636
632
        watch_relink_all();
637
633
 
638
 
        set_pointer();
 
634
        progress_end();
639
635
}
640
636
 
641
637
/* Use a file to paint a named stock item.
796
792
        gtk_widget_realize( main_window_top );
797
793
        main_window_gdk = main_window_top->window;
798
794
 
799
 
#ifdef DEBUG
 
795
#ifdef DEBUG_UPDATES
800
796
        printf( "*** debug updates is on\n" );
801
797
        gdk_window_set_debug_updates( TRUE );
802
 
#endif /*DEBUG*/
 
798
#endif /*DEBUG_UPDATES*/
803
799
 
804
800
        main_register_icons();
805
801
 
806
802
        if( main_splash_enabled() ) {
807
803
                main_splash = splash_new();
808
804
                gtk_widget_show( GTK_WIDGET( main_splash ) );
 
805
 
 
806
                /* Wait for the splashscreen to pop up. We want this to appear
 
807
                 * as quickly as possible.
 
808
                 */
 
809
                while( g_main_context_iteration( NULL, FALSE ) )
 
810
                        ;
809
811
        }
810
812
 
811
813
        /* Next window we make is end of startup.
845
847
        if( main_imageinfogroup )
846
848
                iobject_changed( IOBJECT( main_imageinfogroup ) );
847
849
 
848
 
        nfn( sys, IWINDOW_TRUE );
 
850
        nfn( sys, IWINDOW_YES );
849
851
}
850
852
 
851
853
/* Test for a bunch of stuff in the TMP area. Need to do this before
858
860
{
859
861
        if( total > 10 * 1024 * 1024 ) {
860
862
                char txt[256];
861
 
                BufInfo buf;
 
863
                VipsBuf buf;
862
864
                char tmp[FILENAME_MAX];
863
865
 
864
866
                expand_variables( PATH_TMP, tmp );
865
867
                nativeize_path( tmp );
866
868
                absoluteize_path( tmp );
867
869
 
868
 
                buf_init_static( &buf, txt, 256 );
 
870
                vips_buf_init_static( &buf, txt, 256 );
869
871
                to_size( &buf, total );
870
872
 
871
873
                box_yesno( NULL,
877
879
                        "Would you like to empty the temp area? "
878
880
                        "This will delete any workspace backups and "
879
881
                        "cannot be undone." ),
880
 
                        tmp, buf_all( &buf ) );
 
882
                        tmp, vips_buf_all( &buf ) );
881
883
        }
882
884
}
883
885
 
964
966
#endif /*HAVE_FFTW*/
965
967
        Toolkit *kit;
966
968
        char txt[MAX_STRSIZE];
967
 
        BufInfo buf;
 
969
        VipsBuf buf;
968
970
 
969
971
#ifdef DEBUG_LEAK
970
972
#ifdef PROFILE
1072
1074
        bindtextdomain( GETTEXT_PACKAGE, name );
1073
1075
        bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
1074
1076
 
1075
 
#ifdef G_THREADS_ENABLED
1076
 
        /* If VIPS has been configured without threads, we will need to start
1077
 
         * the thread system ourselves so that we can make the async queue in
1078
 
         * conversion.c
1079
 
         */
1080
 
        if( !g_thread_supported() )
1081
 
                g_thread_init( NULL );
1082
 
#endif /*G_THREADS_ENABLED*/
1083
 
 
1084
1077
        context = g_option_context_new( _( "- image processing spreadsheet" ) );
1085
1078
        g_option_context_add_main_entries( context, 
1086
1079
                main_option, GETTEXT_PACKAGE );
1099
1092
 
1100
1093
        g_option_context_free( context );
1101
1094
 
 
1095
        /* Override the install guess from vips. This won't pick up msg
 
1096
         * cats sadly :( since we have to init i18n before arg parsing. Handy
 
1097
         * for testing without installing.
 
1098
         */
 
1099
        if( main_option_prefix ) {
 
1100
                char tmp[FILENAME_MAX];
 
1101
 
 
1102
                im_strncpy( tmp, main_option_prefix, FILENAME_MAX );
 
1103
                nativeize_path( tmp );
 
1104
                absoluteize_path( tmp );
 
1105
                prefix = im_strdupn( tmp );
 
1106
                setenvf( "VIPSHOME", "%s", prefix );
 
1107
        }
 
1108
 
1102
1109
        if( main_option_version ) {
1103
1110
                printf( "%s-%s", PACKAGE, VERSION );
1104
1111
                printf( "\n" );
1105
1112
 
1106
 
                printf( _( "linked to vips-%s" ), 
1107
 
                        im_version_string() );
 
1113
                printf( _( "linked to vips-%s" ), im_version_string() );
1108
1114
                printf( "\n" );
1109
1115
 
1110
1116
                exit( 0 );
1147
1153
        main_stdin = file_open_read_stdin();
1148
1154
 
1149
1155
#ifdef HAVE_GETRLIMIT
1150
 
        /* Make sure we have lots of file descriptors.
 
1156
        /* Make sure we have lots of file descriptors. Some platforms have cur
 
1157
         * as 256 and max at 1024 to keep stdio happy.
1151
1158
         */
1152
1159
        if( getrlimit( RLIMIT_NOFILE, &rlp ) == 0 ) {
 
1160
                rlim_t old_limit = rlp.rlim_cur;
 
1161
 
1153
1162
                rlp.rlim_cur = rlp.rlim_max;
1154
1163
                if( setrlimit( RLIMIT_NOFILE, &rlp ) == 0 ) {
1155
1164
#ifdef DEBUG
1157
1166
                                (int) rlp.rlim_max );
1158
1167
#endif /*DEBUG*/
1159
1168
                }
1160
 
                else {
1161
 
                        g_warning( _( "unable to change max file "
1162
 
                                "descriptors\n"
 
1169
                else if( (int) rlp.rlim_max != -1 ) {
 
1170
                        /* -1 means can't-be-set, at least on os x, so don't
 
1171
                         * warn.
 
1172
                         */
 
1173
                        g_warning( _( "unable to change max file descriptors\n"
1163
1174
                                "max file descriptors still set to %d" ),
1164
 
                                (int) rlp.rlim_cur );
 
1175
                                (int) old_limit );
1165
1176
                }
1166
1177
        }
1167
1178
        else {
1169
1180
        }
1170
1181
#endif /*HAVE_GETRLIMIT*/
1171
1182
 
 
1183
        /* Make our file types.
 
1184
         */
 
1185
        filesel_startup();
 
1186
 
1172
1187
        /* Set default values for paths.
1173
1188
         */
1174
1189
        path_init();
1217
1232
        g_object_ref( G_OBJECT( main_imageinfogroup ) );
1218
1233
        iobject_sink( IOBJECT( main_imageinfogroup ) );
1219
1234
 
 
1235
        /* First pass at command-line options. Just look at the flags that
 
1236
         * imply other flags, don't do any processing yet.
 
1237
         */
 
1238
        if( main_option_script ) {
 
1239
                main_option_batch = TRUE;
 
1240
                main_option_no_load_menus = TRUE;
 
1241
                main_option_no_load_args = TRUE;
 
1242
                main_option_print_main = TRUE;
 
1243
        }
 
1244
 
 
1245
        if( main_option_test ) {
 
1246
                main_option_batch = TRUE;
 
1247
                main_option_verbose = TRUE;
 
1248
        }
 
1249
 
 
1250
        if( main_option_expression ) {
 
1251
                main_option_batch = TRUE;
 
1252
                main_option_no_load_menus = TRUE;
 
1253
                main_option_no_load_args = TRUE;
 
1254
                main_option_print_main = TRUE;
 
1255
        }
 
1256
 
 
1257
        if( main_option_benchmark ) {
 
1258
                main_option_batch = TRUE;
 
1259
                main_option_no_load_menus = FALSE;
 
1260
        }
 
1261
 
 
1262
        if( main_option_i18n ) {
 
1263
                /* Just start up and shutdown, no X. Output constant
 
1264
                 * i18n strings.
 
1265
                 */
 
1266
                main_option_batch = TRUE;
 
1267
                main_option_no_load_menus = FALSE;
 
1268
        }
 
1269
 
 
1270
#ifdef DEBUG
 
1271
        if( main_option_batch ) 
 
1272
                printf( "non-interactive mode\n" );
 
1273
#endif /*DEBUG*/
 
1274
 
 
1275
        /* Start the X connection. We need this before _load_all(), so that
 
1276
         * we can pop up error dialogs.
 
1277
         */
 
1278
        if( !main_option_batch )
 
1279
                main_x_init( &argc, &argv );
 
1280
 
 
1281
        /* Load start-up stuff. Builtins, plugins, externals etc. We need to
 
1282
         * do this before we load any user code so we can prevent redefinition
 
1283
         * of builtins.
 
1284
         */
 
1285
        main_load_startup();
 
1286
 
1220
1287
#ifdef DEBUG
1221
1288
        printf( "arg processing\n" );
1222
1289
#endif/*DEBUG*/
1226
1293
         */
1227
1294
        ws = NULL;
1228
1295
 
1229
 
        /* Interpret compound options first: these imply other options.
 
1296
        /* Second command-line pass. This time we do any actions.
1230
1297
         */
1231
1298
        if( main_option_script ) {
1232
1299
                if( !toolkit_new_from_file( main_toolkitgroup,
1233
1300
                        main_option_script ) )
1234
1301
                        main_log_add( "%s\n", error_get_sub() );
1235
 
 
1236
 
                main_option_batch = TRUE;
1237
 
                main_option_no_load_menus = TRUE;
1238
 
                main_option_no_load_args = TRUE;
1239
 
                main_option_print_main = TRUE;
1240
1302
        }
1241
1303
 
1242
1304
        if( main_option_expression ) {
1243
1305
                kit = toolkit_new( main_toolkitgroup, "_expression" );
1244
1306
 
1245
 
                buf_init_static( &buf, txt, MAX_STRSIZE );
1246
 
                buf_appendf( &buf, "main = %s;", main_option_expression );
1247
 
                attach_input_string( buf_all( &buf ) );
 
1307
                vips_buf_init_static( &buf, txt, MAX_STRSIZE );
 
1308
                vips_buf_appendf( &buf, "main = %s;", main_option_expression );
 
1309
                attach_input_string( vips_buf_all( &buf ) );
1248
1310
                (void) parse_onedef( kit, -1 );
1249
1311
 
1250
1312
                filemodel_set_modified( FILEMODEL( kit ), FALSE );
1251
 
 
1252
 
                main_option_batch = TRUE;
1253
 
                main_option_no_load_menus = TRUE;
1254
 
                main_option_no_load_args = TRUE;
1255
 
                main_option_print_main = TRUE;
1256
 
        }
1257
 
 
1258
 
        if( main_option_benchmark ) {
1259
 
                main_option_batch = TRUE;
1260
 
                main_option_no_load_menus = FALSE;
1261
 
        }
1262
 
 
1263
 
        if( main_option_i18n ) {
1264
 
                /* Just start up and shutdown, no X. Output constant
1265
 
                 * i18n strings.
1266
 
                 */
1267
 
                main_option_batch = TRUE;
1268
 
                main_option_no_load_menus = FALSE;
1269
1313
        }
1270
1314
 
1271
1315
        if( main_option_stdin_def ) {
1272
 
                /* Load stdin as a set of defs. Good for HEREIS 
1273
 
                 * shell scripts.
1274
 
                 */
1275
1316
                if( !(kit = toolkit_new_from_openfile( 
1276
1317
                        main_toolkitgroup, main_stdin )) )
1277
1318
                        main_log_add( "%s\n", error_get_sub() );
1278
1319
        }
1279
1320
 
1280
1321
        if( main_option_stdin_ws ) {
1281
 
                /* Load stdin as a workspace.
1282
 
                 */
1283
1322
                if( !(ws = workspace_new_from_openfile( 
1284
1323
                        main_workspacegroup, main_stdin )) ) 
1285
1324
                        main_log_add( "%s\n", error_get_sub() );
1296
1335
                ws = workspace_new_blank( main_workspacegroup, name );
1297
1336
        }
1298
1337
 
1299
 
#ifdef DEBUG
1300
 
        if( main_option_batch ) 
1301
 
                printf( "non-interactive mode\n" );
1302
 
#endif /*DEBUG*/
1303
 
 
1304
 
        /* Start the X connection. We need this before _load_all(), so that
1305
 
         * we can pop up error dialogs.
1306
 
         */
1307
 
        if( !main_option_batch )
1308
 
                main_x_init( &argc, &argv );
1309
 
 
1310
1338
        /* Reset IM_CONCURRENCY if a watch changes. Need to do this after
1311
1339
         * parsing options so we skip in batch mode.
1312
1340
         */
1313
1341
        g_signal_connect( main_watchgroup, "watch_changed", 
1314
1342
                G_CALLBACK( main_watchgroup_changed_cb ), NULL );
1315
1343
 
1316
 
        /* Load start-up stuff.
1317
 
         */
1318
 
        main_load_startup();
1319
 
 
1320
1344
        /* Recalc to build all classes. We have to do this in batch
1321
1345
         * mode since we can find dirties through dynamic lookups. Even though
1322
1346
         * you might think we could just follow recomps.
1323
1347
         */
1324
 
        main_splash_update( "%s", _( "First recalculation ..." ) );
1325
 
        symbol_recalculate_all();
 
1348
        symbol_recalculate_all_force( TRUE );
1326
1349
 
1327
1350
        /* Measure amount of stuff in temp area ... need this for checking
1328
1351
         * temps later. We pop a dialog if there are too many, so only useful
1334
1357
        /* Make nip's argc/argv[].
1335
1358
         */
1336
1359
        kit = toolkit_new( main_toolkitgroup, "_args" );
1337
 
        buf_init_static( &buf, txt, MAX_STRSIZE );
1338
 
        buf_appendf( &buf, "argc = %d;", argc );
1339
 
        attach_input_string( buf_all( &buf ) );
 
1360
        vips_buf_init_static( &buf, txt, MAX_STRSIZE );
 
1361
        vips_buf_appendf( &buf, "argc = %d;", argc );
 
1362
        attach_input_string( vips_buf_all( &buf ) );
1340
1363
        (void) parse_onedef( kit, -1 );
1341
1364
 
1342
 
        buf_init_static( &buf, txt, MAX_STRSIZE );
1343
 
        buf_appendf( &buf, "argv = [" );
 
1365
        vips_buf_init_static( &buf, txt, MAX_STRSIZE );
 
1366
        vips_buf_appendf( &buf, "argv = [" );
1344
1367
        for( i = 0; i < argc; i++ ) {
1345
1368
                if( i > 0 )
1346
 
                        buf_appendf( &buf, ", " );
1347
 
                buf_appendf( &buf, "\"%s\"", argv[i] );
 
1369
                        vips_buf_appendf( &buf, ", " );
 
1370
                vips_buf_appendf( &buf, "\"%s\"", argv[i] );
1348
1371
        }
1349
 
        buf_appendf( &buf, "];" );
 
1372
        vips_buf_appendf( &buf, "];" );
1350
1373
 
1351
 
        attach_input_string( buf_all( &buf ) );
 
1374
        attach_input_string( vips_buf_all( &buf ) );
1352
1375
        if( !parse_onedef( kit, -1 ) ) 
1353
1376
                main_log_add( "%s\n", error_get_sub() );
1354
1377
 
1382
1405
 
1383
1406
        /* Recalc to load any args.
1384
1407
         */
1385
 
        main_splash_update( "%s", _( "Final recalculation ..." ) );
1386
 
        symbol_recalculate_all();
 
1408
        symbol_recalculate_all_force( TRUE );
1387
1409
 
1388
1410
        /* Make sure our start ws doesn't have modified set. We may have
1389
1411
         * loaded some images or whatever into it.
1404
1426
                if( !workspace_is_empty( ws ) || mainw_number() == 0 ) {
1405
1427
                        Mainw *mainw;
1406
1428
                        
1407
 
                        main_splash_update( _( "Building main window" ) );
1408
1429
                        mainw = mainw_new( ws );
1409
1430
                        gtk_widget_show( GTK_WIDGET( mainw ) );
1410
1431
                }
1461
1482
                gtk_main();
1462
1483
        }
1463
1484
 
 
1485
        if( main_option_test && expr_error_all )
 
1486
                main_error_exit( "--test: errors found" );
 
1487
 
 
1488
        /* No return from this.
 
1489
         */
1464
1490
        main_quit();
1465
1491
 
1466
1492
        return( 0 );