Commit c49df22e authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

Action code review and pre-release consistency cleanup:

2004-10-18  Michael Natterer  <mitch@gimp.org>

	Action code review and pre-release consistency cleanup:

	* app/actions/*-actions.c: added some missing and resolved
	conflicting mnemonics, added missing help IDs. Cleaned up the
	*_actions_update() functions.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c (*_actions_update): simplified
	the code that figures the prev and next channel,layer,vectors.

	* app/actions/qmask-actions.c: use the same accelerator for
	"qmask-active" and "qmask-toggle". Fixed action sensitivity.

	* app/actions/channels-commands.c
	* app/actions/dockable-commands.c
	* app/actions/documents-commands.c
	* app/actions/gradients-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/image-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c: folded tons of private utility
	functions into their only callers (they used to be public and
	called from outside before the switch to action based menus).
	Renamed functions and variables saying "query" or "qbox" to
	"dialog". Moved static functions to the end of the files. Misc
	minor cleanups.

	* app/actions/drawable-actions.c
	* app/actions/drawable-commands.c: made the "drawable-visible" and
	"drawable-linked" actions affect the layer if the active drawable
	is a layer mask.

	* app/actions/select-commands.c: added action to stroke with the
	last values used in an attempt to address bug #135746 but #if 0'ed
	it because the approach is too ugly.

	* app/tools/gimpiscissorstool.c: changed mnemonic from I to S.

	* menus/image-menu-xml.in: added more stuff to the (commented out)
	"context" menu.
parent c79b64e6
2004-10-18 Michael Natterer <mitch@gimp.org>
Action code review and pre-release consistency cleanup:
* app/actions/*-actions.c: added some missing and resolved
conflicting mnemonics, added missing help IDs. Cleaned up the
*_actions_update() functions.
* app/actions/channels-actions.c
* app/actions/layers-actions.c
* app/actions/vectors-actions.c (*_actions_update): simplified
the code that figures the prev and next channel,layer,vectors.
* app/actions/qmask-actions.c: use the same accelerator for
"qmask-active" and "qmask-toggle". Fixed action sensitivity.
* app/actions/channels-commands.c
* app/actions/dockable-commands.c
* app/actions/documents-commands.c
* app/actions/gradients-commands.c
* app/actions/layers-commands.c
* app/actions/palettes-commands.c
* app/actions/image-commands.c
* app/actions/select-commands.c
* app/actions/vectors-commands.c: folded tons of private utility
functions into their only callers (they used to be public and
called from outside before the switch to action based menus).
Renamed functions and variables saying "query" or "qbox" to
"dialog". Moved static functions to the end of the files. Misc
minor cleanups.
* app/actions/drawable-actions.c
* app/actions/drawable-commands.c: made the "drawable-visible" and
"drawable-linked" actions affect the layer if the active drawable
is a layer mask.
* app/actions/select-commands.c: added action to stroke with the
last values used in an attempt to address bug #135746 but #if 0'ed
it because the approach is too ugly.
* app/tools/gimpiscissorstool.c: changed mnemonic from I to S.
* menus/image-menu-xml.in: added more stuff to the (commented out)
"context" menu.
2004-10-17 DindinX <dindinx@gimp.org>
* libgimp/gimppixelrgn.c: some more clues in the documentation
......
......@@ -28,7 +28,6 @@
#include "core/gimpdata.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpdatafactoryview.h"
#include "widgets/gimphelp-ids.h"
#include "actions.h"
......@@ -40,11 +39,12 @@
static GimpActionEntry brushes_actions[] =
{
{ "brushes-popup", GIMP_STOCK_BRUSH, N_("Brushes Menu"), NULL, NULL, NULL,
{ "brushes-popup", GIMP_STOCK_BRUSH,
N_("Brushes Menu"), NULL, NULL, NULL,
GIMP_HELP_BRUSH_DIALOG },
{ "brushes-new", GTK_STOCK_NEW,
N_("New Brush"), "",
N_("_New Brush"), "",
N_("New brush"),
G_CALLBACK (data_new_data_cmd_callback),
GIMP_HELP_BRUSH_NEW },
......@@ -95,11 +95,9 @@ void
brushes_actions_update (GimpActionGroup *group,
gpointer user_data)
{
GimpContext *context;
GimpBrush *brush = NULL;
GimpData *data = NULL;
context = action_data_get_context (user_data);
GimpContext *context = action_data_get_context (user_data);
GimpBrush *brush = NULL;
GimpData *data = NULL;
if (context)
{
......
......@@ -38,7 +38,8 @@
static GimpActionEntry buffers_actions[] =
{
{ "buffers-popup", GIMP_STOCK_BUFFER, N_("Buffers Menu"), NULL, NULL, NULL,
{ "buffers-popup", GIMP_STOCK_BUFFER,
N_("Buffers Menu"), NULL, NULL, NULL,
GIMP_HELP_BUFFER_DIALOG },
{ "buffers-paste", GTK_STOCK_PASTE,
......@@ -79,10 +80,8 @@ void
buffers_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpContext *context;
GimpBuffer *buffer = NULL;
context = action_data_get_context (data);
GimpContext *context = action_data_get_context (data);
GimpBuffer *buffer = NULL;
if (context)
buffer = gimp_context_get_buffer (context);
......
......@@ -40,7 +40,8 @@
static GimpActionEntry channels_actions[] =
{
{ "channels-popup", GIMP_STOCK_CHANNELS, N_("Channels Menu"), NULL, NULL, NULL,
{ "channels-popup", GIMP_STOCK_CHANNELS,
N_("Channels Menu"), NULL, NULL, NULL,
GIMP_HELP_CHANNEL_DIALOG },
{ "channels-edit-attributes", GIMP_STOCK_EDIT,
......@@ -143,15 +144,13 @@ void
channels_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *gimage;
GimpImage *gimage = action_data_get_image (data);
GimpChannel *channel = NULL;
gboolean fs = FALSE;
gboolean component = FALSE;
GList *next = NULL;
GList *prev = NULL;
gimage = action_data_get_image (data);
if (gimage)
{
fs = (gimp_image_floating_sel (gimage) != NULL);
......@@ -163,19 +162,18 @@ channels_actions_update (GimpActionGroup *group,
}
else
{
GList *list;
channel = gimp_image_get_active_channel (gimage);
for (list = GIMP_LIST (gimage->channels)->list;
list;
list = g_list_next (list))
if (channel)
{
if (channel == (GimpChannel *) list->data)
GList *list;
list = g_list_find (GIMP_LIST (gimage->channels)->list, channel);
if (list)
{
prev = g_list_previous (list);
next = g_list_next (list);
break;
}
}
}
......
......@@ -62,19 +62,13 @@ struct _ChannelOptions
/* local function prototypes */
static ChannelOptions * channels_query_new (GimpImage *gimage,
static ChannelOptions * channel_options_new (GimpImage *gimage,
GimpContext *context,
GimpChannel *channel,
GtkWidget *parent);
static void channels_new_channel_query (GimpImage *gimage,
GimpContext *context,
GtkWidget *parent);
static void channels_new_channel_response (GtkWidget *widget,
gint response_id,
ChannelOptions *options);
static void channels_edit_channel_query (GimpChannel *channel,
GimpContext *context,
GtkWidget *parent);
static void channels_edit_channel_response (GtkWidget *widget,
gint response_id,
ChannelOptions *options);
......@@ -96,26 +90,42 @@ void
channels_edit_attributes_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
GimpChannel *channel;
GtkWidget *widget;
ChannelOptions *options;
GimpImage *gimage;
GimpChannel *channel;
GtkWidget *widget;
return_if_no_channel (gimage, channel, data);
return_if_no_widget (widget, data);
channels_edit_channel_query (channel, action_data_get_context (data),
widget);
options = channel_options_new (gimp_item_get_image (GIMP_ITEM (channel)),
action_data_get_context (data),
channel, widget);
g_signal_connect (options->query_box, "response",
G_CALLBACK (channels_edit_channel_response),
options);
gtk_widget_show (options->query_box);
}
void
channels_new_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
GtkWidget *widget;
ChannelOptions *options;
GimpImage *gimage;
GtkWidget *widget;
return_if_no_image (gimage, data);
return_if_no_widget (widget, data);
channels_new_channel_query (gimage, action_data_get_context (data), widget);
options = channel_options_new (gimage, action_data_get_context (data),
NULL, widget);
g_signal_connect (options->query_box, "response",
G_CALLBACK (channels_new_channel_response),
options);
gtk_widget_show (options->query_box);
}
void
......@@ -310,10 +320,10 @@ channels_to_selection_cmd_callback (GtkAction *action,
/* private functions */
static ChannelOptions *
channels_query_new (GimpImage *gimage,
GimpContext *context,
GimpChannel *channel,
GtkWidget *parent)
channel_options_new (GimpImage *gimage,
GimpContext *context,
GimpChannel *channel,
GtkWidget *parent)
{
ChannelOptions *options;
GtkWidget *hbox;
......@@ -427,22 +437,6 @@ channels_query_new (GimpImage *gimage,
return options;
}
static void
channels_new_channel_query (GimpImage *gimage,
GimpContext *context,
GtkWidget *parent)
{
ChannelOptions *options;
options = channels_query_new (gimage, context, NULL, parent);
g_signal_connect (options->query_box, "response",
G_CALLBACK (channels_new_channel_response),
options);
gtk_widget_show (options->query_box);
}
static void
channels_new_channel_response (GtkWidget *widget,
gint response_id,
......@@ -477,26 +471,6 @@ channels_new_channel_response (GtkWidget *widget,
gtk_widget_destroy (options->query_box);
}
static void
channels_edit_channel_query (GimpChannel *channel,
GimpContext *context,
GtkWidget *parent)
{
ChannelOptions *options;
g_return_if_fail (GIMP_IS_CHANNEL (channel));
g_return_if_fail (GIMP_IS_CONTEXT (context));
options = channels_query_new (gimp_item_get_image (GIMP_ITEM (channel)),
context, channel, parent);
g_signal_connect (options->query_box, "response",
G_CALLBACK (channels_edit_channel_response),
options);
gtk_widget_show (options->query_box);
}
static void
channels_edit_channel_response (GtkWidget *widget,
gint response_id,
......
......@@ -82,16 +82,13 @@ void
colormap_editor_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *gimage;
GimpContext *context;
GimpImage *gimage = action_data_get_image (data);
GimpContext *context = action_data_get_context (data);
gboolean indexed = FALSE;
gint num_colors = 0;
GimpRGB fg;
GimpRGB bg;
gimage = action_data_get_image (data);
context = action_data_get_context (data);
if (gimage)
{
indexed = gimp_image_base_type (gimage) == GIMP_INDEXED;
......
......@@ -82,16 +82,13 @@ void
colormap_editor_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *gimage;
GimpContext *context;
GimpImage *gimage = action_data_get_image (data);
GimpContext *context = action_data_get_context (data);
gboolean indexed = FALSE;
gint num_colors = 0;
GimpRGB fg;
GimpRGB bg;
gimage = action_data_get_image (data);
context = action_data_get_context (data);
if (gimage)
{
indexed = gimp_image_base_type (gimage) == GIMP_INDEXED;
......
......@@ -47,6 +47,7 @@ static GimpActionEntry context_actions[] =
{ "context-colors-menu", GIMP_STOCK_DEFAULT_COLORS, N_("_Colors") },
{ "context-opacity-menu", GIMP_STOCK_TRANSPARENCY, N_("_Opacity") },
{ "context-paint-mode-menu", GIMP_STOCK_TOOL_PENCIL, N_("Paint _Mode") },
{ "context-tool-menu", GIMP_STOCK_TOOLS, N_("_Tool") },
{ "context-brush-menu", GIMP_STOCK_BRUSH, N_("_Brush") },
{ "context-pattern-menu", GIMP_STOCK_PATTERN, N_("_Pattern") },
{ "context-palette-menu", GIMP_STOCK_PALETTE, N_("_Palette") },
......@@ -709,7 +710,7 @@ void
context_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpContext *context;
GimpContext *context = action_data_get_context (data);
gboolean generated = FALSE;
gdouble radius = 0.0;
gint spikes = 0;
......@@ -717,8 +718,6 @@ context_actions_update (GimpActionGroup *group,
gdouble aspect = 0.0;
gdouble angle = 0.0;
context = action_data_get_context (data);
if (context)
{
GimpBrush *brush = gimp_context_get_brush (context);
......
......@@ -107,7 +107,7 @@ GimpStringActionEntry dialogs_dockable_actions[] =
GIMP_HELP_NAVIGATION_DIALOG },
{ "dialogs-undo-history", GIMP_STOCK_UNDO_HISTORY,
N_("_Undo History"), NULL, NULL,
N_("Undo _History"), NULL, NULL,
"gimp-undo-history",
GIMP_HELP_UNDO_DIALOG },
......@@ -117,7 +117,7 @@ GimpStringActionEntry dialogs_dockable_actions[] =
GIMP_HELP_COLOR_DIALOG },
{ "dialogs-brushes", GIMP_STOCK_BRUSH,
N_("Brus_hes"), "<control><shift>B", NULL,
N_("_Brushes"), "<control><shift>B", NULL,
"gimp-brush-grid|gimp-brush-list",
GIMP_HELP_BRUSH_DIALOG },
......@@ -142,7 +142,7 @@ GimpStringActionEntry dialogs_dockable_actions[] =
GIMP_HELP_FONT_DIALOG },
{ "dialogs-buffers", GIMP_STOCK_BUFFER,
N_("_Buffers"), "", NULL,
N_("B_uffers"), "", NULL,
"gimp-buffer-list|gimp-buffer-grid",
GIMP_HELP_BUFFER_DIALOG },
......
......@@ -45,12 +45,13 @@
static GimpActionEntry dockable_actions[] =
{
{ "dockable-popup", NULL, N_("Dialogs Menu"), NULL, NULL, NULL,
{ "dockable-popup", NULL,
N_("Dialogs Menu"), NULL, NULL, NULL,
GIMP_HELP_DOCK },
{ "dockable-menu", GTK_STOCK_MISSING_IMAGE, "" },
{ "dockable-add-tab-menu", NULL, N_("_Add Tab") },
{ "dockable-preview-size-menu", NULL, N_("Preview Si_ze") },
{ "dockable-preview-size-menu", NULL, N_("_Preview Size") },
{ "dockable-tab-style-menu", NULL, N_("_Tab Style") },
{ "dockable-close-tab", GTK_STOCK_CLOSE,
......@@ -64,7 +65,7 @@ static GimpActionEntry dockable_actions[] =
GIMP_HELP_DOCK_TAB_DETACH },
{ "dockable-move-to-screen", GIMP_STOCK_MOVE_TO_SCREEN,
N_("Move to Screen..."), NULL, NULL,
N_("M_ove to Screen..."), NULL, NULL,
G_CALLBACK (dockable_change_screen_cmd_callback),
GIMP_HELP_DOCK_CHANGE_SCREEN }
};
......@@ -72,13 +73,13 @@ static GimpActionEntry dockable_actions[] =
static GimpToggleActionEntry dockable_toggle_actions[] =
{
{ "dockable-show-image-menu", NULL,
N_("Show Image _Menu"), NULL, NULL,
N_("_Show Image Menu"), NULL, NULL,
G_CALLBACK (dockable_toggle_image_menu_cmd_callback),
TRUE,
GIMP_HELP_DOCK_IMAGE_MENU },
{ "dockable-auto-follow-active", NULL,
N_("Auto Follow Active _Image"), NULL, NULL,
N_("Auto _Follow Active Image"), NULL, NULL,
G_CALLBACK (dockable_toggle_auto_cmd_callback),
TRUE,
GIMP_HELP_DOCK_AUTO_BUTTON }
......
......@@ -39,6 +39,15 @@
#include "dockable-commands.h"
/* local function prototypes */
static void dockable_change_screen_confirm_callback (GtkWidget *query_box,
gint value,
gpointer data);
static void dockable_change_screen_destroy_callback (GtkWidget *query_box,
GtkWidget *dock);
/* public functions */
void
......@@ -295,27 +304,6 @@ dockable_toggle_auto_cmd_callback (GtkAction *action,
active);
}
static void
dockable_change_screen_confirm_callback (GtkWidget *query_box,
gint value,
gpointer data)
{
GdkScreen *screen;
screen = gdk_display_get_screen (gtk_widget_get_display (GTK_WIDGET (data)),
value);
if (screen)
gtk_window_set_screen (GTK_WINDOW (data), screen);
}
static void
dockable_change_screen_destroy_callback (GtkWidget *query_box,
GtkWidget *dock)
{
g_object_set_data (G_OBJECT (dock), "gimp-change-screen-dialog", NULL);
}
void
dockable_change_screen_cmd_callback (GtkAction *action,
gpointer data)
......@@ -361,3 +349,27 @@ dockable_change_screen_cmd_callback (GtkAction *action,
gtk_widget_show (qbox);
}
/* private functions */
static void
dockable_change_screen_confirm_callback (GtkWidget *query_box,
gint value,
gpointer data)
{
GdkScreen *screen;
screen = gdk_display_get_screen (gtk_widget_get_display (GTK_WIDGET (data)),
value);
if (screen)
gtk_window_set_screen (GTK_WINDOW (data), screen);
}
static void
dockable_change_screen_destroy_callback (GtkWidget *query_box,
GtkWidget *dock)
{
g_object_set_data (G_OBJECT (dock), "gimp-change-screen-dialog", NULL);
}
......@@ -38,7 +38,8 @@
static GimpActionEntry documents_actions[] =
{
{ "documents-popup", GTK_STOCK_OPEN, N_("Documents Menu"), NULL, NULL, NULL,
{ "documents-popup", GTK_STOCK_OPEN,
N_("Documents Menu"), NULL, NULL, NULL,
GIMP_HELP_DOCUMENT_DIALOG },
{ "documents-open", GTK_STOCK_OPEN,
......
......@@ -49,10 +49,21 @@
#include "gimp-intl.h"
typedef struct _RaiseClosure RaiseClosure;
struct _RaiseClosure
{
const gchar *name;
gboolean found;
};
/* local function prototypes */
static void documents_open_image (GimpContext *context,
GimpImagefile *imagefile);
static void documents_open_image (GimpContext *context,
GimpImagefile *imagefile);
static void documents_raise_display (gpointer data,
gpointer user_data);
/* public functions */
......@@ -81,31 +92,6 @@ documents_open_document_cmd_callback (GtkAction *action,
}
}
typedef struct _RaiseClosure RaiseClosure;
struct _RaiseClosure
{
const gchar *name;
gboolean found;
};
static void
documents_raise_display (gpointer data,
gpointer user_data)
{
GimpDisplay *gdisp = (GimpDisplay *) data;
RaiseClosure *closure = (RaiseClosure *) user_data;
const gchar *uri;
uri = gimp_object_get_name (GIMP_OBJECT (gdisp->gimage));
if (uri && ! strcmp (closure->name, uri))
{
closure->found = TRUE;
gtk_window_present (GTK_WINDOW (gdisp->shell));
}
}
void
documents_raise_or_open_document_cmd_callback (GtkAction *action,
gpointer data)
......@@ -276,3 +262,20 @@ documents_open_image (GimpContext *context,
g_free (filename);
}
}
static void
documents_raise_display (gpointer data,
gpointer user_data)
{
GimpDisplay *gdisp = data;
RaiseClosure *closure = user_data;
const gchar *uri;
uri = gimp_object_get_name (GIMP_OBJECT (gdisp->gimage));
if (uri && ! strcmp (closure->name, uri))
{
closure->found = TRUE;
gtk_window_present (GTK_WINDOW (gdisp->shell));
}
}
......@@ -25,10 +25,9 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
......@@ -152,13 +151,18 @@ drawable_actions_update (GimpActionGroup *group,
if (drawable)
{
GimpItem *item = GIMP_ITEM (drawable);
GimpImageType drawable_type = gimp_drawable_type (drawable);
GimpItem *item;
is_rgb = GIMP_IMAGE_TYPE_IS_RGB (drawable_type);
is_gray = GIMP_IMAGE_TYPE_IS_GRAY (drawable_type);
is_indexed = GIMP_IMAGE_TYPE_IS_INDEXED (drawable_type);
if (GIMP_IS_LAYER_MASK (drawable))
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
else
item = GIMP_ITEM (drawable);
visible = gimp_item_get_visible (item);
linked = gimp_item_get_linked (item);
}
......
......@@ -25,7 +25,6 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpdrawable-desaturate.h"
#include "core/gimpdrawable-equalize.h"
#include "core/gimpdrawable-invert.h"
......@@ -33,6 +32,7 @@
#include "core/gimpimage-undo.h"
#include "core/gimpitem-linked.h"
#include "core/gimpitemundo.h"
#include "core/gimplayermask.h"
#include "dialogs/offset-dialog.h"
......@@ -109,6 +109,10 @@ drawable_visible_cmd_callback (GtkAction *action,
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
GIMP_DRAWABLE (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
if (visible != gimp_item_get_visible (GIMP_ITEM (drawable)))
{
GimpUndo *undo;
......@@ -136,6 +140,10 @@ drawable_linked_cmd_callback (GtkAction *action,
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
GIMP_DRAWABLE (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
if (linked != gimp_item_get_linked (GIMP_ITEM (drawable)))
{
GimpUndo *undo;
......
......@@ -58,8 +58,8 @@ static void edit_actions_pattern_changed (GimpContext *context,
static GimpActionEntry edit_actions[] =
{
{ "edit-menu", NULL, N_("_Edit") },
{ "edit-buffer-menu", NULL, N_("Buffer") },
{ "edit-menu", NULL, N_("_Edit") },
{ "edit-buffer-menu", NULL, N_("_Buffer") },
{ "edit-undo", GTK_STOCK_UNDO,
N_("_Undo"), "<control>Z",
......
......@@ -36,8 +36,8 @@
static GimpActionEntry error_console_actions[] =
{
{ "error-console-popup", GIMP_STOCK_WARNING, N_("Error Console Menu"),
NULL, NULL, NULL,
{ "error-console-popup", GIMP_STOCK_WARNING,
N_("Error Console Menu"), NULL, NULL, NULL,
GIMP_HELP_ERRORS_DIALOG },
{ "error-console-clear", GTK_STOCK_CLEAR,
......@@ -69,11 +69,9 @@ void
error_console_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpErrorConsole *console;
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean selection;
console = GIMP_ERROR_CONSOLE (data);
selection = gtk_text_buffer_get_selection_bounds (console->text_buffer,
NULL, NULL);
......
......@@ -189,11 +189,9 @@ void
file_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *gimage = NULL;
GimpImage *gimage = action_data_get_image (data);
GimpDrawable *drawable = NULL;
gimage = action_data_get_image (data);
if (gimage)
drawable = gimp_image_active_drawable (gimage);
......
......@@ -40,7 +40,8 @@
static GimpActionEntry fonts_actions[] =
{
{ "fonts-popup", GIMP_STOCK_FONT, N_("Fonts Menu"), NULL, NULL, NULL,
{ "fonts-popup", GIMP_STOCK_FONT,
N_("Fonts Menu"), NULL, NULL, NULL,
GIMP_HELP_FONT_DIALOG },
{ "fonts-refresh", GTK_STOCK_REFRESH,
......@@ -63,10 +64,8 @@ void
fonts_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpContext *context;
GimpFont *font = NULL;
context = action_data_get_context (data);
GimpContext *context = action_data_get_context (data);
GimpFont *font = NULL;
if (context)