1
/* The GIMP -- an image manipulation program
2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#include "libgimpwidgets/gimpwidgets.h"
25
#include "actions-types.h"
27
#include "core/gimpcontext.h"
29
#include "text/gimpfont.h"
31
#include "widgets/gimpactiongroup.h"
32
#include "widgets/gimphelp-ids.h"
35
#include "fonts-actions.h"
36
#include "fonts-commands.h"
38
#include "gimp-intl.h"
41
static GimpActionEntry fonts_actions[] =
43
{ "fonts-popup", GIMP_STOCK_FONT,
44
N_("Fonts Menu"), NULL, NULL, NULL,
45
GIMP_HELP_FONT_DIALOG },
47
{ "fonts-refresh", GTK_STOCK_REFRESH,
48
N_("_Rescan Font List"), "",
49
N_("Rescan font list"),
50
G_CALLBACK (fonts_refresh_cmd_callback),
51
GIMP_HELP_FONT_REFRESH }
56
fonts_actions_setup (GimpActionGroup *group)
58
gimp_action_group_add_actions (group,
60
G_N_ELEMENTS (fonts_actions));
64
fonts_actions_update (GimpActionGroup *group,
67
GimpContext *context = action_data_get_context (data);
68
GimpFont *font = NULL;
71
font = gimp_context_get_font (context);
73
#define SET_SENSITIVE(action,condition) \
74
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
76
SET_SENSITIVE ("fonts-refresh", TRUE);