2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2004-04-19 22:54:24 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2004-04-19 22:54:24 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2004-04-19 22:54:24 +08:00
|
|
|
* (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
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2004-04-19 22:54:24 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2012-03-30 01:19:01 +08:00
|
|
|
#include <gegl.h>
|
2004-04-19 22:54:24 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
|
|
|
#include "actions-types.h"
|
|
|
|
|
|
|
|
#include "core/gimpcontext.h"
|
|
|
|
|
|
|
|
#include "text/gimpfont.h"
|
|
|
|
|
|
|
|
#include "widgets/gimpactiongroup.h"
|
|
|
|
#include "widgets/gimphelp-ids.h"
|
|
|
|
|
2004-05-12 00:05:21 +08:00
|
|
|
#include "actions.h"
|
2018-06-03 05:19:51 +08:00
|
|
|
#include "data-commands.h"
|
2004-04-19 22:54:24 +08:00
|
|
|
#include "fonts-actions.h"
|
|
|
|
|
|
|
|
#include "gimp-intl.h"
|
|
|
|
|
|
|
|
|
2006-04-10 16:06:18 +08:00
|
|
|
static const GimpActionEntry fonts_actions[] =
|
2004-04-19 22:54:24 +08:00
|
|
|
{
|
2017-03-05 23:01:59 +08:00
|
|
|
{ "fonts-popup", GIMP_ICON_FONT,
|
2008-12-03 23:27:42 +08:00
|
|
|
NC_("fonts-action", "Fonts Menu"), NULL, NULL, NULL,
|
2004-05-02 16:56:07 +08:00
|
|
|
GIMP_HELP_FONT_DIALOG },
|
2004-04-22 00:10:00 +08:00
|
|
|
|
2017-03-05 23:01:59 +08:00
|
|
|
{ "fonts-refresh", GIMP_ICON_VIEW_REFRESH,
|
2014-05-12 04:49:22 +08:00
|
|
|
NC_("fonts-action", "_Rescan Font List"), NULL,
|
2008-12-04 18:32:20 +08:00
|
|
|
NC_("fonts-action", "Rescan the installed fonts"),
|
2018-06-03 05:19:51 +08:00
|
|
|
G_CALLBACK (data_refresh_cmd_callback),
|
2004-04-19 22:54:24 +08:00
|
|
|
GIMP_HELP_FONT_REFRESH }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2004-04-27 21:55:26 +08:00
|
|
|
fonts_actions_setup (GimpActionGroup *group)
|
2004-04-19 22:54:24 +08:00
|
|
|
{
|
2008-12-03 23:27:42 +08:00
|
|
|
gimp_action_group_add_actions (group, "fonts-action",
|
2004-04-19 22:54:24 +08:00
|
|
|
fonts_actions,
|
2004-04-27 21:55:26 +08:00
|
|
|
G_N_ELEMENTS (fonts_actions));
|
2004-04-19 22:54:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
fonts_actions_update (GimpActionGroup *group,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
#define SET_SENSITIVE(action,condition) \
|
|
|
|
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
|
|
|
|
|
|
|
SET_SENSITIVE ("fonts-refresh", TRUE);
|
|
|
|
|
|
|
|
#undef SET_SENSITIVE
|
|
|
|
}
|