~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to tools/pdbgen/pdb/font_select.pdb

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# The GIMP -- an image manipulation program
 
1
# GIMP - The GNU Image Manipulation Program
2
2
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 
4
4
# This program is free software; you can redistribute it and/or modify
17
17
 
18
18
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
19
19
 
20
 
sub pdb_misc {
21
 
    $author = 'Sven Neumann  <sven@gimp.org>';
22
 
    $copyright = 'Sven Neumann';
23
 
    $date = '2003';
24
 
}
25
 
 
26
20
sub fonts_popup {
27
21
    $blurb = 'Invokes the Gimp font selection.';
28
 
 
29
 
    $help = 'This procedure popups the font selection dialog.';
30
 
 
31
 
    &pdb_misc;
 
22
    $help  = 'This procedure opens the font selection dialog.';
 
23
 
 
24
    &neo_pdb_misc('2003');
32
25
 
33
26
    @inargs = (
34
27
        { name => 'font_callback', type => 'string',
35
 
          desc => 'The callback PDB proc to call when font selection is
36
 
                   made' },
 
28
          desc => 'The callback PDB proc to call when font selection is made' },
37
29
        { name => 'popup_title', type => 'string',
38
 
          desc => 'Title to give the font popup window' },
39
 
        { name => 'initial_font', type => 'string',
40
 
          desc => 'The name of the font to set as the first selected',
41
 
          null_ok => 1 }
 
30
          desc => 'Title of the font selection dialog' },
 
31
        { name => 'initial_font', type => 'string', null_ok => 1,
 
32
          desc => 'The name of the font to set as the first selected' }
42
33
    );
43
34
 
44
35
    %invoke = (
45
36
        code => <<'CODE'
46
37
{
47
38
  if (gimp->no_interface ||
48
 
      ! procedural_db_lookup (gimp, font_callback) ||
49
 
      ! gimp_pdb_dialog_new (gimp, context, gimp->fonts,
 
39
      ! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
 
40
      ! gimp_pdb_dialog_new (gimp, context, progress, gimp->fonts,
50
41
                             popup_title, font_callback, initial_font,
51
42
                             NULL))
52
43
    success = FALSE;
56
47
}
57
48
 
58
49
sub fonts_close_popup {
59
 
    $blurb = 'Popdown the Gimp font selection.';
60
 
 
61
 
    $help = 'This procedure closes an opened font selection dialog.';
62
 
 
63
 
    &pdb_misc;
 
50
    $blurb = 'Close the font selection dialog.';
 
51
    $help  = 'This procedure closes an opened font selection dialog.';
 
52
 
 
53
    &neo_pdb_misc('2003');
64
54
 
65
55
    @inargs = (
66
56
        { name => 'font_callback', type => 'string',
67
 
          desc => 'The name of the callback registered for this popup' }
 
57
          desc => 'The name of the callback registered for this pop-up' }
68
58
    );
69
59
 
70
60
    %invoke = (
71
61
        code => <<'CODE'
72
62
{
73
63
  if (gimp->no_interface ||
74
 
      ! procedural_db_lookup (gimp, font_callback) ||
 
64
      ! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
75
65
      ! gimp_pdb_dialog_close (gimp, gimp->fonts, font_callback))
76
66
    success = FALSE;
77
67
}
80
70
}
81
71
 
82
72
sub fonts_set_popup {
83
 
    $blurb = 'Sets the current font selection in a popup.';
84
 
 
85
 
    $help = $blurb;
86
 
 
87
 
    &pdb_misc;
 
73
    $blurb = 'Sets the current font in a font selection dialog.';
 
74
    $help  = $blurb;
 
75
 
 
76
    &neo_pdb_misc('2003');
88
77
 
89
78
    @inargs = (
90
79
        { name => 'font_callback', type => 'string',
91
 
          desc => 'The name of the callback registered for this popup' },
 
80
          desc => 'The name of the callback registered for this pop-up' },
92
81
        { name => 'font_name', type => 'string',
93
82
          desc => 'The name of the font to set as selected' }
94
83
    );
97
86
        code => <<'CODE'
98
87
{
99
88
  if (gimp->no_interface ||
100
 
      ! procedural_db_lookup (gimp, font_callback) ||
 
89
      ! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
101
90
      ! gimp_pdb_dialog_set (gimp, gimp->fonts, font_callback, font_name,
102
91
                             NULL))
103
92
    success = FALSE;
106
95
    );
107
96
}
108
97
 
 
98
 
109
99
@headers = qw("core/gimp.h");
110
100
 
111
101
@procs = qw(fonts_popup fonts_close_popup fonts_set_popup);
 
102
 
112
103
%exports = (app => [@procs], lib => [@procs]);
113
104
 
114
105
$desc = 'Font UI';