47
45
* or the GTokenType they would have expected but didn't get.
50
static GTokenType plug_in_def_deserialize (Gimp *gimp,
52
static GTokenType plug_in_proc_def_deserialize (GScanner *scanner,
53
PlugInProcDef *proc_def);
54
static GTokenType plug_in_menu_path_deserialize (GScanner *scanner,
55
PlugInProcDef *proc_def);
56
static GTokenType plug_in_icon_deserialize (GScanner *scanner,
57
PlugInProcDef *proc_def);
58
static GTokenType plug_in_proc_arg_deserialize (GScanner *scanner,
60
static GTokenType plug_in_extra_deserialize (GScanner *scanner,
61
PlugInProcDef *proc_def);
62
static GTokenType plug_in_locale_def_deserialize (GScanner *scanner,
63
PlugInDef *plug_in_def);
64
static GTokenType plug_in_help_def_deserialize (GScanner *scanner,
65
PlugInDef *plug_in_def);
66
static GTokenType plug_in_has_init_deserialize (GScanner *scanner,
67
PlugInDef *plug_in_def);
48
static GTokenType plug_in_def_deserialize (Gimp *gimp,
50
GSList **plug_in_defs);
51
static GTokenType plug_in_procedure_deserialize (GScanner *scanner,
54
GimpPlugInProcedure **proc);
55
static GTokenType plug_in_menu_path_deserialize (GScanner *scanner,
56
GimpPlugInProcedure *proc);
57
static GTokenType plug_in_icon_deserialize (GScanner *scanner,
58
GimpPlugInProcedure *proc);
59
static GTokenType plug_in_file_proc_deserialize (GScanner *scanner,
60
GimpPlugInProcedure *proc);
61
static GTokenType plug_in_proc_arg_deserialize (GScanner *scanner,
63
GimpProcedure *procedure,
64
gboolean return_value);
65
static GTokenType plug_in_locale_def_deserialize (GScanner *scanner,
66
GimpPlugInDef *plug_in_def);
67
static GTokenType plug_in_help_def_deserialize (GScanner *scanner,
68
GimpPlugInDef *plug_in_def);
69
static GTokenType plug_in_has_init_deserialize (GScanner *scanner,
70
GimpPlugInDef *plug_in_def);
125
134
g_scanner_scope_add_symbol (scanner, PLUG_IN_DEF,
126
135
"icon", GINT_TO_POINTER (ICON));
127
136
g_scanner_scope_add_symbol (scanner, PLUG_IN_DEF,
137
"load-proc", GINT_TO_POINTER (LOAD_PROC));
138
g_scanner_scope_add_symbol (scanner, PLUG_IN_DEF,
139
"save-proc", GINT_TO_POINTER (SAVE_PROC));
141
g_scanner_scope_add_symbol (scanner, LOAD_PROC,
142
"extension", GINT_TO_POINTER (EXTENSION));
143
g_scanner_scope_add_symbol (scanner, LOAD_PROC,
144
"prefix", GINT_TO_POINTER (PREFIX));
145
g_scanner_scope_add_symbol (scanner, LOAD_PROC,
146
"magic", GINT_TO_POINTER (MAGIC));
147
g_scanner_scope_add_symbol (scanner, LOAD_PROC,
128
148
"mime-type", GINT_TO_POINTER (MIME_TYPE));
129
g_scanner_scope_add_symbol (scanner, PLUG_IN_DEF,
149
g_scanner_scope_add_symbol (scanner, LOAD_PROC,
130
150
"thumb-loader", GINT_TO_POINTER (THUMB_LOADER));
152
g_scanner_scope_add_symbol (scanner, SAVE_PROC,
153
"extension", GINT_TO_POINTER (EXTENSION));
154
g_scanner_scope_add_symbol (scanner, SAVE_PROC,
155
"prefix", GINT_TO_POINTER (PREFIX));
156
g_scanner_scope_add_symbol (scanner, SAVE_PROC,
157
"mime-type", GINT_TO_POINTER (MIME_TYPE));
132
159
token = G_TOKEN_LEFT_PAREN;
134
161
while (version == GIMP_PROTOCOL_VERSION &&
172
if (version != GIMP_PROTOCOL_VERSION)
175
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_VERSION,
176
_("Skipping '%s': wrong GIMP protocol version."),
177
gimp_filename_to_utf8 (filename));
179
else if (token != G_TOKEN_LEFT_PAREN)
181
g_scanner_get_next_token (scanner);
182
g_scanner_unexp_token (scanner, token, NULL, NULL, NULL,
183
_("fatal parse error"), TRUE);
199
if (version != GIMP_PROTOCOL_VERSION ||
200
token != G_TOKEN_LEFT_PAREN)
202
if (version != GIMP_PROTOCOL_VERSION)
205
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_VERSION,
206
_("Skipping '%s': wrong GIMP protocol version."),
207
gimp_filename_to_utf8 (filename));
211
g_scanner_get_next_token (scanner);
212
g_scanner_unexp_token (scanner, token, NULL, NULL, NULL,
213
_("fatal parse error"), TRUE);
216
g_slist_foreach (plug_in_defs, (GFunc) g_object_unref, NULL);
217
g_slist_free (plug_in_defs);
190
221
g_type_class_unref (enum_class);
192
223
gimp_scanner_destroy (scanner);
225
return g_slist_reverse (plug_in_defs);
197
228
static GTokenType
198
plug_in_def_deserialize (Gimp *gimp,
229
plug_in_def_deserialize (Gimp *gimp,
231
GSList **plug_in_defs)
202
PlugInDef *plug_in_def;
203
PlugInProcDef *proc_def;
233
GimpPlugInDef *plug_in_def;
234
GimpPlugInProcedure *proc = NULL;
206
240
if (! gimp_scanner_parse_string (scanner, &name))
207
241
return G_TOKEN_STRING;
209
plug_in_def = plug_in_def_new (name);
243
path = gimp_config_path_expand (name, TRUE, NULL);
212
if (! gimp_scanner_parse_int (scanner, (gint *) &plug_in_def->mtime))
246
plug_in_def = gimp_plug_in_def_new (path);
249
if (! gimp_scanner_parse_int (scanner, &mtime))
214
plug_in_def_free (plug_in_def, TRUE);
251
g_object_unref (plug_in_def);
215
252
return G_TOKEN_INT;
255
plug_in_def->mtime = mtime;
218
257
token = G_TOKEN_LEFT_PAREN;
220
259
while (g_scanner_peek_next_token (scanner) == token)
273
314
if (gimp_scanner_parse_token (scanner, token))
275
plug_ins_def_add_from_rc (gimp, plug_in_def);
316
*plug_in_defs = g_slist_prepend (*plug_in_defs, plug_in_def);
276
317
return G_TOKEN_LEFT_PAREN;
280
plug_in_def_free (plug_in_def, TRUE);
321
g_object_unref (plug_in_def);
285
326
static GTokenType
286
plug_in_proc_def_deserialize (GScanner *scanner,
287
PlugInProcDef *proc_def)
327
plug_in_procedure_deserialize (GScanner *scanner,
330
GimpPlugInProcedure **proc)
293
if (! gimp_scanner_parse_string (scanner, &proc_def->db_info.name))
294
return G_TOKEN_STRING;
295
if (! gimp_scanner_parse_int (scanner, (gint *) &proc_def->db_info.proc_type))
297
if (! gimp_scanner_parse_string (scanner, &proc_def->db_info.blurb))
298
return G_TOKEN_STRING;
299
if (! gimp_scanner_parse_string (scanner, &proc_def->db_info.help))
300
return G_TOKEN_STRING;
301
if (! gimp_scanner_parse_string (scanner, &proc_def->db_info.author))
302
return G_TOKEN_STRING;
303
if (! gimp_scanner_parse_string (scanner, &proc_def->db_info.copyright))
304
return G_TOKEN_STRING;
305
if (! gimp_scanner_parse_string (scanner, &proc_def->db_info.date))
306
return G_TOKEN_STRING;
307
if (! gimp_scanner_parse_string (scanner, &proc_def->menu_label))
332
GimpProcedure *procedure;
341
if (! gimp_scanner_parse_string (scanner, &str))
342
return G_TOKEN_STRING;
344
if (! gimp_scanner_parse_int (scanner, &proc_type))
350
procedure = gimp_plug_in_procedure_new (proc_type, prog);
352
*proc = GIMP_PLUG_IN_PROCEDURE (procedure);
354
gimp_object_take_name (GIMP_OBJECT (procedure),
355
gimp_canonicalize_identifier (str));
357
procedure->original_name = str;
359
if (! gimp_scanner_parse_string (scanner, &procedure->blurb))
360
return G_TOKEN_STRING;
361
if (! gimp_scanner_parse_string (scanner, &procedure->help))
362
return G_TOKEN_STRING;
363
if (! gimp_scanner_parse_string (scanner, &procedure->author))
364
return G_TOKEN_STRING;
365
if (! gimp_scanner_parse_string (scanner, &procedure->copyright))
366
return G_TOKEN_STRING;
367
if (! gimp_scanner_parse_string (scanner, &procedure->date))
368
return G_TOKEN_STRING;
369
if (! gimp_scanner_parse_string (scanner, &(*proc)->menu_label))
308
370
return G_TOKEN_STRING;
310
372
if (! gimp_scanner_parse_int (scanner, &n_menu_paths))
311
return G_TOKEN_STRING;
313
375
for (i = 0; i < n_menu_paths; i++)
315
token = plug_in_menu_path_deserialize (scanner, proc_def);
316
if (token != G_TOKEN_LEFT_PAREN)
320
token = plug_in_icon_deserialize (scanner, proc_def);
321
if (token != G_TOKEN_LEFT_PAREN)
324
if (! gimp_scanner_parse_string (scanner, &proc_def->extensions))
325
return G_TOKEN_STRING;
326
if (! gimp_scanner_parse_string (scanner, &proc_def->prefixes))
327
return G_TOKEN_STRING;
328
if (! gimp_scanner_parse_string_no_validate (scanner, &proc_def->magics))
329
return G_TOKEN_STRING;
330
if (! gimp_scanner_parse_string (scanner, &proc_def->image_types))
331
return G_TOKEN_STRING;
333
proc_def->image_types_val =
334
plug_ins_image_types_parse (proc_def->image_types);
336
if (! gimp_scanner_parse_int (scanner, (gint *) &proc_def->db_info.num_args))
338
if (! gimp_scanner_parse_int (scanner, (gint *) &proc_def->db_info.num_values))
341
if (proc_def->db_info.num_args > 0)
342
proc_def->db_info.args = g_new0 (ProcArg, proc_def->db_info.num_args);
344
for (i = 0; i < proc_def->db_info.num_args; i++)
346
token = plug_in_proc_arg_deserialize (scanner,
347
&proc_def->db_info.args[i]);
348
if (token != G_TOKEN_LEFT_PAREN)
352
if (proc_def->db_info.num_values > 0)
353
proc_def->db_info.values = g_new0 (ProcArg, proc_def->db_info.num_values);
355
for (i = 0; i < proc_def->db_info.num_values; i++)
357
token = plug_in_proc_arg_deserialize (scanner,
358
&proc_def->db_info.values[i]);
359
if (token != G_TOKEN_LEFT_PAREN)
363
token = plug_in_extra_deserialize (scanner, proc_def);
365
if (token != G_TOKEN_LEFT_PAREN)
377
token = plug_in_menu_path_deserialize (scanner, *proc);
378
if (token != G_TOKEN_LEFT_PAREN)
382
token = plug_in_icon_deserialize (scanner, *proc);
383
if (token != G_TOKEN_LEFT_PAREN)
386
token = plug_in_file_proc_deserialize (scanner, *proc);
387
if (token != G_TOKEN_LEFT_PAREN)
390
if (! gimp_scanner_parse_string (scanner, &str))
391
return G_TOKEN_STRING;
393
gimp_plug_in_procedure_set_image_types (*proc, str);
396
if (! gimp_scanner_parse_int (scanner, (gint *) &n_args))
398
if (! gimp_scanner_parse_int (scanner, (gint *) &n_return_vals))
401
for (i = 0; i < n_args; i++)
403
token = plug_in_proc_arg_deserialize (scanner, gimp, procedure, FALSE);
404
if (token != G_TOKEN_LEFT_PAREN)
408
for (i = 0; i < n_return_vals; i++)
410
token = plug_in_proc_arg_deserialize (scanner, gimp, procedure, TRUE);
411
if (token != G_TOKEN_LEFT_PAREN)
368
415
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
369
416
return G_TOKEN_RIGHT_PAREN;
509
569
if (! gimp_scanner_parse_token (scanner, G_TOKEN_SYMBOL))
510
570
return G_TOKEN_SYMBOL;
512
switch (GPOINTER_TO_INT (scanner->value.v_symbol))
572
symbol = GPOINTER_TO_INT (scanner->value.v_symbol);
576
if (! gimp_scanner_parse_string_no_validate (scanner, &value))
577
return G_TOKEN_STRING;
581
if (! gimp_scanner_parse_string (scanner, &value))
582
return G_TOKEN_STRING;
588
g_free (proc->extensions);
589
proc->extensions = value;
593
g_free (proc->prefixes);
594
proc->prefixes = value;
598
g_free (proc->magics);
599
proc->magics = value;
515
if (! gimp_scanner_parse_string (scanner, &value))
516
return G_TOKEN_STRING;
518
g_free (proc_def->mime_type);
519
proc_def->mime_type = value;
603
gimp_plug_in_procedure_set_mime_type (proc, value);
522
607
case THUMB_LOADER:
523
if (! gimp_scanner_parse_string (scanner, &value))
524
return G_TOKEN_STRING;
526
g_free (proc_def->thumb_loader);
527
proc_def->thumb_loader = value;
608
gimp_plug_in_procedure_set_thumb_loader (proc, value);
531
613
return G_TOKEN_SYMBOL;
534
615
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
535
616
return G_TOKEN_RIGHT_PAREN;
619
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
620
return G_TOKEN_RIGHT_PAREN;
622
g_scanner_set_scope (scanner, PLUG_IN_DEF);
538
624
return G_TOKEN_LEFT_PAREN;
541
627
static GTokenType
542
plug_in_proc_arg_deserialize (GScanner *scanner,
628
plug_in_proc_arg_deserialize (GScanner *scanner,
630
GimpProcedure *procedure,
631
gboolean return_value)
545
639
if (! gimp_scanner_parse_token (scanner, G_TOKEN_LEFT_PAREN))
546
return G_TOKEN_LEFT_PAREN;
641
token = G_TOKEN_LEFT_PAREN;
548
645
if (! gimp_scanner_parse_token (scanner, G_TOKEN_SYMBOL) ||
549
646
GPOINTER_TO_INT (scanner->value.v_symbol) != PROC_ARG)
550
return G_TOKEN_SYMBOL;
552
if (! gimp_scanner_parse_int (scanner, (gint *) &arg->arg_type))
554
if (! gimp_scanner_parse_string (scanner, &arg->name))
555
return G_TOKEN_STRING;
556
if (! gimp_scanner_parse_string (scanner, &arg->description))
557
return G_TOKEN_STRING;
559
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
560
return G_TOKEN_RIGHT_PAREN;
562
return G_TOKEN_LEFT_PAREN;
566
plug_in_locale_def_deserialize (GScanner *scanner,
567
PlugInDef *plug_in_def)
571
if (! gimp_scanner_parse_string (scanner, &string))
572
return G_TOKEN_STRING;
574
plug_in_def_set_locale_domain_name (plug_in_def, string);
577
if (gimp_scanner_parse_string (scanner, &string))
579
plug_in_def_set_locale_domain_path (plug_in_def, string);
583
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
584
return G_TOKEN_RIGHT_PAREN;
586
return G_TOKEN_LEFT_PAREN;
590
plug_in_help_def_deserialize (GScanner *scanner,
591
PlugInDef *plug_in_def)
595
if (! gimp_scanner_parse_string (scanner, &string))
596
return G_TOKEN_STRING;
598
plug_in_def_set_help_domain_name (plug_in_def, string);
601
if (gimp_scanner_parse_string (scanner, &string))
603
plug_in_def_set_help_domain_uri (plug_in_def, string);
607
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
608
return G_TOKEN_RIGHT_PAREN;
610
return G_TOKEN_LEFT_PAREN;
614
plug_in_has_init_deserialize (GScanner *scanner,
615
PlugInDef *plug_in_def)
617
plug_in_def_set_has_init (plug_in_def, TRUE);
648
token = G_TOKEN_SYMBOL;
652
if (! gimp_scanner_parse_int (scanner, (gint *) &arg_type))
657
if (! gimp_scanner_parse_string (scanner, &name))
659
token = G_TOKEN_STRING;
662
if (! gimp_scanner_parse_string (scanner, &desc))
664
token = G_TOKEN_STRING;
668
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
670
token = G_TOKEN_RIGHT_PAREN;
674
token = G_TOKEN_LEFT_PAREN;
676
pspec = gimp_pdb_compat_param_spec (gimp, arg_type, name, desc);
679
gimp_procedure_add_return_value (procedure, pspec);
681
gimp_procedure_add_argument (procedure, pspec);
692
plug_in_locale_def_deserialize (GScanner *scanner,
693
GimpPlugInDef *plug_in_def)
698
if (! gimp_scanner_parse_string (scanner, &domain_name))
699
return G_TOKEN_STRING;
701
if (! gimp_scanner_parse_string (scanner, &domain_path))
704
gimp_plug_in_def_set_locale_domain (plug_in_def, domain_name, domain_path);
706
g_free (domain_name);
707
g_free (domain_path);
709
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
710
return G_TOKEN_RIGHT_PAREN;
712
return G_TOKEN_LEFT_PAREN;
716
plug_in_help_def_deserialize (GScanner *scanner,
717
GimpPlugInDef *plug_in_def)
722
if (! gimp_scanner_parse_string (scanner, &domain_name))
723
return G_TOKEN_STRING;
725
if (! gimp_scanner_parse_string (scanner, &domain_uri))
728
gimp_plug_in_def_set_help_domain (plug_in_def, domain_name, domain_uri);
730
g_free (domain_name);
733
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
734
return G_TOKEN_RIGHT_PAREN;
736
return G_TOKEN_LEFT_PAREN;
740
plug_in_has_init_deserialize (GScanner *scanner,
741
GimpPlugInDef *plug_in_def)
743
gimp_plug_in_def_set_has_init (plug_in_def, TRUE);
619
745
if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
620
746
return G_TOKEN_RIGHT_PAREN;
659
780
for (list = plug_in_defs; list; list = list->next)
661
plug_in_def = list->data;
663
if (plug_in_def->proc_defs)
782
GimpPlugInDef *plug_in_def = list->data;
784
if (plug_in_def->procedures)
789
utf8 = g_filename_to_utf8 (plug_in_def->prog, -1, NULL, NULL, NULL);
665
794
gimp_config_writer_open (writer, "plug-in-def");
666
gimp_config_writer_string (writer, plug_in_def->prog);
795
gimp_config_writer_string (writer, utf8);
667
796
gimp_config_writer_printf (writer, "%ld", plug_in_def->mtime);
669
for (list2 = plug_in_def->proc_defs; list2; list2 = list2->next)
671
GEnumValue *enum_value;
673
proc_def = list2->data;
675
if (proc_def->installed_during_init)
800
for (list2 = plug_in_def->procedures; list2; list2 = list2->next)
802
GimpPlugInProcedure *proc = list2->data;
803
GimpProcedure *procedure = GIMP_PROCEDURE (proc);
804
GEnumValue *enum_value;
808
if (proc->installed_during_init)
678
811
gimp_config_writer_open (writer, "proc-def");
679
812
gimp_config_writer_printf (writer, "\"%s\" %d",
680
proc_def->db_info.name,
681
proc_def->db_info.proc_type);
682
gimp_config_writer_linefeed (writer);
683
gimp_config_writer_string (writer, proc_def->db_info.blurb);
684
gimp_config_writer_linefeed (writer);
685
gimp_config_writer_string (writer, proc_def->db_info.help);
686
gimp_config_writer_linefeed (writer);
687
gimp_config_writer_string (writer, proc_def->db_info.author);
688
gimp_config_writer_linefeed (writer);
689
gimp_config_writer_string (writer, proc_def->db_info.copyright);
690
gimp_config_writer_linefeed (writer);
691
gimp_config_writer_string (writer, proc_def->db_info.date);
692
gimp_config_writer_linefeed (writer);
693
gimp_config_writer_string (writer, proc_def->menu_label);
694
gimp_config_writer_linefeed (writer);
813
procedure->original_name,
814
procedure->proc_type);
815
gimp_config_writer_linefeed (writer);
816
gimp_config_writer_string (writer, procedure->blurb);
817
gimp_config_writer_linefeed (writer);
818
gimp_config_writer_string (writer, procedure->help);
819
gimp_config_writer_linefeed (writer);
820
gimp_config_writer_string (writer, procedure->author);
821
gimp_config_writer_linefeed (writer);
822
gimp_config_writer_string (writer, procedure->copyright);
823
gimp_config_writer_linefeed (writer);
824
gimp_config_writer_string (writer, procedure->date);
825
gimp_config_writer_linefeed (writer);
826
gimp_config_writer_string (writer, proc->menu_label);
827
gimp_config_writer_linefeed (writer);
696
829
gimp_config_writer_printf (writer, "%d",
697
g_list_length (proc_def->menu_paths));
698
for (list3 = proc_def->menu_paths; list3; list3 = list3->next)
830
g_list_length (proc->menu_paths));
831
for (list3 = proc->menu_paths; list3; list3 = list3->next)
700
833
gimp_config_writer_open (writer, "menu-path");
701
834
gimp_config_writer_string (writer, list3->data);
705
838
gimp_config_writer_open (writer, "icon");
706
enum_value = g_enum_get_value (enum_class, proc_def->icon_type);
839
enum_value = g_enum_get_value (enum_class, proc->icon_type);
707
840
gimp_config_writer_identifier (writer, enum_value->value_nick);
708
841
gimp_config_writer_printf (writer, "%d",
709
proc_def->icon_data_length);
842
proc->icon_data_length);
711
switch (proc_def->icon_type)
844
switch (proc->icon_type)
713
846
case GIMP_ICON_TYPE_STOCK_ID:
714
847
case GIMP_ICON_TYPE_IMAGE_FILE:
715
gimp_config_writer_string (writer, proc_def->icon_data);
848
gimp_config_writer_string (writer, (gchar *) proc->icon_data);
718
851
case GIMP_ICON_TYPE_INLINE_PIXBUF:
719
gimp_config_writer_data (writer, proc_def->icon_data_length,
720
proc_def->icon_data);
852
gimp_config_writer_data (writer, proc->icon_data_length,
724
857
gimp_config_writer_close (writer);
726
gimp_config_writer_linefeed (writer);
728
gimp_config_writer_string (writer, proc_def->extensions);
729
gimp_config_writer_linefeed (writer);
730
gimp_config_writer_string (writer, proc_def->prefixes);
731
gimp_config_writer_linefeed (writer);
732
gimp_config_writer_string (writer, proc_def->magics);
733
gimp_config_writer_linefeed (writer);
734
gimp_config_writer_string (writer, proc_def->image_types);
735
gimp_config_writer_linefeed (writer);
737
gimp_config_writer_printf (writer, "%d %d",
738
proc_def->db_info.num_args,
739
proc_def->db_info.num_values);
741
for (i = 0; i < proc_def->db_info.num_args; i++)
743
gimp_config_writer_open (writer, "proc-arg");
744
gimp_config_writer_printf (writer, "%d",
745
proc_def->db_info.args[i].arg_type);
747
gimp_config_writer_string (writer,
748
proc_def->db_info.args[i].name);
749
gimp_config_writer_string (writer,
750
proc_def->db_info.args[i].description);
752
gimp_config_writer_close (writer);
755
for (i = 0; i < proc_def->db_info.num_values; i++)
757
gimp_config_writer_open (writer, "proc-arg");
758
gimp_config_writer_printf (writer, "%d",
759
proc_def->db_info.values[i].arg_type);
761
gimp_config_writer_string (writer,
762
proc_def->db_info.values[i].name);
763
gimp_config_writer_string (writer,
764
proc_def->db_info.values[i].description);
766
gimp_config_writer_close (writer);
769
if (proc_def->mime_type)
771
gimp_config_writer_open (writer, "mime-type");
772
gimp_config_writer_string (writer, proc_def->mime_type);
773
gimp_config_writer_close (writer);
776
if (proc_def->thumb_loader)
778
gimp_config_writer_open (writer, "thumb-loader");
779
gimp_config_writer_string (writer, proc_def->thumb_loader);
780
gimp_config_writer_close (writer);
783
gimp_config_writer_close (writer);
786
if (plug_in_def->locale_domain_name)
861
gimp_config_writer_open (writer,
863
"save-proc" : "load-proc");
865
if (proc->extensions && *proc->extensions)
867
gimp_config_writer_open (writer, "extension");
868
gimp_config_writer_string (writer, proc->extensions);
869
gimp_config_writer_close (writer);
872
if (proc->prefixes && *proc->prefixes)
874
gimp_config_writer_open (writer, "prefix");
875
gimp_config_writer_string (writer, proc->prefixes);
876
gimp_config_writer_close (writer);
879
if (proc->magics && *proc->magics)
881
gimp_config_writer_open (writer, "magic");
882
gimp_config_writer_string (writer, proc->magics);
883
gimp_config_writer_close (writer);
888
gimp_config_writer_open (writer, "mime-type");
889
gimp_config_writer_string (writer, proc->mime_type);
890
gimp_config_writer_close (writer);
893
if (proc->thumb_loader)
895
gimp_config_writer_open (writer, "thumb-loader");
896
gimp_config_writer_string (writer, proc->thumb_loader);
897
gimp_config_writer_close (writer);
900
gimp_config_writer_close (writer);
903
gimp_config_writer_linefeed (writer);
905
gimp_config_writer_string (writer, proc->image_types);
906
gimp_config_writer_linefeed (writer);
908
gimp_config_writer_printf (writer, "%d %d",
910
procedure->num_values);
912
for (i = 0; i < procedure->num_args; i++)
914
GParamSpec *pspec = procedure->args[i];
916
gimp_config_writer_open (writer, "proc-arg");
917
gimp_config_writer_printf (writer, "%d",
918
gimp_pdb_compat_arg_type_from_gtype (G_PARAM_SPEC_VALUE_TYPE (pspec)));
920
gimp_config_writer_string (writer,
921
g_param_spec_get_name (pspec));
922
gimp_config_writer_string (writer,
923
g_param_spec_get_blurb (pspec));
925
gimp_config_writer_close (writer);
928
for (i = 0; i < procedure->num_values; i++)
930
GParamSpec *pspec = procedure->values[i];
932
gimp_config_writer_open (writer, "proc-arg");
933
gimp_config_writer_printf (writer, "%d",
934
gimp_pdb_compat_arg_type_from_gtype (G_PARAM_SPEC_VALUE_TYPE (pspec)));
936
gimp_config_writer_string (writer,
937
g_param_spec_get_name (pspec));
938
gimp_config_writer_string (writer,
939
g_param_spec_get_blurb (pspec));
941
gimp_config_writer_close (writer);
944
gimp_config_writer_close (writer);
947
if (plug_in_def->locale_domain_name)
788
949
gimp_config_writer_open (writer, "locale-def");
789
950
gimp_config_writer_string (writer,
790
951
plug_in_def->locale_domain_name);
792
if (plug_in_def->locale_domain_path)
793
gimp_config_writer_string (writer,
953
if (plug_in_def->locale_domain_path)
954
gimp_config_writer_string (writer,
794
955
plug_in_def->locale_domain_path);
796
957
gimp_config_writer_close (writer);
799
if (plug_in_def->help_domain_name)
801
gimp_config_writer_open (writer, "help-def");
960
if (plug_in_def->help_domain_name)
962
gimp_config_writer_open (writer, "help-def");
802
963
gimp_config_writer_string (writer,
803
964
plug_in_def->help_domain_name);
805
if (plug_in_def->help_domain_uri)
806
gimp_config_writer_string (writer,
966
if (plug_in_def->help_domain_uri)
967
gimp_config_writer_string (writer,
807
968
plug_in_def->help_domain_uri);
809
970
gimp_config_writer_close (writer);
812
if (plug_in_def->has_init)
814
gimp_config_writer_open (writer, "has-init");
973
if (plug_in_def->has_init)
975
gimp_config_writer_open (writer, "has-init");
815
976
gimp_config_writer_close (writer);
818
gimp_config_writer_close (writer);
979
gimp_config_writer_close (writer);
822
983
g_type_class_unref (enum_class);