Commit bba84137 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/core/Makefile.am new files: the QMask stuff stripped from GUI code.

2001-11-30  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpimage-qmask.[ch]: new files: the QMask stuff
	stripped from GUI code. Added gimp_image_qmask_invert().

	* app/core/gimpimage.[ch]: removed the QMask functions.

	* app/display/Makefile.am
	* app/display/gimpdisplayshell-qmask.[ch]: removed.

	* app/gui/Makefile.am
	* app/gui/qmask-commands.[ch]: new files for the new QMask item
	factory callbacks and the qmask query dialog.

	* app/gui/menus.c: added a context menu for the QMask button.

	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-handlers.c: don't include the qmask
	stuff.

	* app/display/gimpdisplayshell-callbacks.[ch]: Moved the 2 qmask
	callbacks here. Don't popup the dialog on double_click. Show
	the contect menu on right-click.

	* app/display/gimpdisplayshell-callbacks.[ch]:
	gimp_display_shell_canvas_events(): removed the hack of
	conntecting "key_press_event" to gtk_true() while a tool is
	active. Instead, check for (event & GDK_BUTTON1_MASK) in the
	key_press and key_release handlers and stop signal emission. Save
	the modifier state on "button_press" and restore it after
	"button_release".

	Changed the way context menus are updated/shown:

	- removed GimpContainerContextFunc.
	- pass around item factory identifiers (e.g. "<Brushes>")
	- added voodoo to update the menus before showing them.

	* app/widgets/gimpitemfactory.[ch]: gimp_item_factory_new(): take
	a GimpItemFactoryUpdateFunc parameter, attach it as data to the
	factory and use it to update the menu in
	gimp_item_factory_popup_with_date().

	* app/widgets/gimpwidgets-utils.[ch]: removed
	gimp_item_factory_popup_with_data() here.

	* app/widgets/gimpbrushfactoryview.[ch]
	* app/widgets/gimpbufferview.[ch]
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimpdrawablelistview.[ch]: use item_factory
	identifier strings all over the place.

	* app/widgets/gimpdockbook.c: removed the menu update code, it's
	now in gui/dialogs-commands.c.

	* app/gui/brushes-commands.[ch]
	* app/gui/buffers-commands.[c]
	* app/gui/channels-commands.[ch]
	* app/gui/dialogs-commands.[ch]
	* app/gui/documents-commands.[ch]
	* app/gui/gradient-editor-commands.[ch]
	* app/gui/gradients-commands.[ch]
	* app/gui/layers-commands.[ch]
	* app/gui/palettes-commands.[ch]
	* app/gui/patterns-commands.[ch]: removed all show_context_menu()
	functions and made the update functions public. Changed all
	update functions to use the gimp_item_factory_set_foo() methods
	instead of gimp_menu_item_set_foo().

	* app/gui/menus.c: pass the update functions to the
	gimp_item_factory_new().

	* app/gui/dialogs-constructors.c: pass item factory identifiers to
	all view constructors.

	* app/gui/gradient-editor.c: show the context menu using the new
	method.

	* app/gui/toolbox.c: no need to include "dialogs-commands.h".
parent 84f148fe
2001-11-30 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-qmask.[ch]: new files: the QMask stuff
stripped from GUI code. Added gimp_image_qmask_invert().
* app/core/gimpimage.[ch]: removed the QMask functions.
* app/display/Makefile.am
* app/display/gimpdisplayshell-qmask.[ch]: removed.
* app/gui/Makefile.am
* app/gui/qmask-commands.[ch]: new files for the new QMask item
factory callbacks and the qmask query dialog.
* app/gui/menus.c: added a context menu for the QMask button.
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-handlers.c: don't include the qmask
stuff.
* app/display/gimpdisplayshell-callbacks.[ch]: Moved the 2 qmask
callbacks here. Don't popup the dialog on double_click. Show
the contect menu on right-click.
* app/display/gimpdisplayshell-callbacks.[ch]:
gimp_display_shell_canvas_events(): removed the hack of
conntecting "key_press_event" to gtk_true() while a tool is
active. Instead, check for (event & GDK_BUTTON1_MASK) in the
key_press and key_release handlers and stop signal emission. Save
the modifier state on "button_press" and restore it after
"button_release".
Changed the way context menus are updated/shown:
- removed GimpContainerContextFunc.
- pass around item factory identifiers (e.g. "<Brushes>")
- added voodoo to update the menus before showing them.
* app/widgets/gimpitemfactory.[ch]: gimp_item_factory_new(): take
a GimpItemFactoryUpdateFunc parameter, attach it as data to the
factory and use it to update the menu in
gimp_item_factory_popup_with_date().
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_item_factory_popup_with_data() here.
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpdrawablelistview.[ch]: use item_factory
identifier strings all over the place.
* app/widgets/gimpdockbook.c: removed the menu update code, it's
now in gui/dialogs-commands.c.
* app/gui/brushes-commands.[ch]
* app/gui/buffers-commands.[c]
* app/gui/channels-commands.[ch]
* app/gui/dialogs-commands.[ch]
* app/gui/documents-commands.[ch]
* app/gui/gradient-editor-commands.[ch]
* app/gui/gradients-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/palettes-commands.[ch]
* app/gui/patterns-commands.[ch]: removed all show_context_menu()
functions and made the update functions public. Changed all
update functions to use the gimp_item_factory_set_foo() methods
instead of gimp_menu_item_set_foo().
* app/gui/menus.c: pass the update functions to the
gimp_item_factory_new().
* app/gui/dialogs-constructors.c: pass item factory identifiers to
all view constructors.
* app/gui/gradient-editor.c: show the context menu using the new
method.
* app/gui/toolbox.c: no need to include "dialogs-commands.h".
2001-11-29 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.c (gimp_config_serialize): ooops.
......@@ -28,7 +111,7 @@
2001-11-29 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: replaced the QMask radio
buttons ba a single check button. Still needs some tuning.
buttons by a single check button. Still needs some tuning.
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-qmask.[ch]: changed accordingly.
......@@ -43,7 +126,7 @@
display manually (we have the pointer grabbed anyway).
* app/display/gimpdisplayshell-callbacks.c: don't check for
GIMP_IS_MODE_TOOL(active_tool) but look at
GIMP_IS_MOVE_TOOL(active_tool) but look at
active_tool->handle_empty_image. Removed the checks for
GIMP_IS_FUZZY_SELECT_TOOL(active_tool) because fuzzy_select
doesn't set GIMP busy while it's active any more.
......
......@@ -40,11 +40,6 @@
#include "libgimp/gimpintl.h"
/* local function prototypes */
static void buffers_menu_set_sensitivity (GimpContainerEditor *editor);
/* public functionss */
void
......@@ -104,34 +99,23 @@ buffers_delete_buffer_cmd_callback (GtkWidget *widget,
}
void
buffers_show_context_menu (GimpContainerEditor *editor)
buffers_menu_update (GtkItemFactory *factory,
gpointer data)
{
GtkItemFactory *item_factory;
buffers_menu_set_sensitivity (editor);
item_factory = gtk_item_factory_from_path ("<Buffers>");
GimpContainerEditor *editor;
GimpBuffer *buffer;
gimp_item_factory_popup_with_data (item_factory, editor);
}
/* private functions */
static void
buffers_menu_set_sensitivity (GimpContainerEditor *editor)
{
GimpBuffer *buffer;
editor = GIMP_CONTAINER_EDITOR (data);
buffer = gimp_context_get_buffer (editor->view->context);
#define SET_SENSITIVE(menu,condition) \
gimp_menu_item_set_sensitive ("<Buffers>/" menu, (condition) != 0)
gimp_item_factory_set_sensitive (factory, menu, (condition) != 0)
SET_SENSITIVE ("Paste Buffer", buffer);
SET_SENSITIVE ("Paste Buffer Into", buffer);
SET_SENSITIVE ("Paste Buffer as New", buffer);
SET_SENSITIVE ("Delete Buffer", buffer);
SET_SENSITIVE ("/Paste Buffer", buffer);
SET_SENSITIVE ("/Paste Buffer Into", buffer);
SET_SENSITIVE ("/Paste Buffer as New", buffer);
SET_SENSITIVE ("/Delete Buffer", buffer);
#undef SET_SENSITIVE
}
......@@ -29,8 +29,8 @@ void buffers_paste_buffer_as_new_cmd_callback (GtkWidget *widget,
void buffers_delete_buffer_cmd_callback (GtkWidget *widget,
gpointer data);
void buffers_show_context_menu (GimpContainerEditor *editor);
void buffers_menu_update (GtkItemFactory *factory,
gpointer data);
#endif /* __BUFFERS_COMMANDS_H__ */
......@@ -42,11 +42,6 @@
#include "libgimp/gimpintl.h"
/* local function prototypes */
static void channels_menu_set_sensitivity (GimpImage *gimage);
/* public functions */
void
......@@ -592,29 +587,17 @@ channels_edit_channel_query (GimpChannel *channel)
}
void
channels_show_context_menu (GimpImage *gimage)
{
GtkItemFactory *item_factory;
channels_menu_set_sensitivity (gimage);
item_factory = gtk_item_factory_from_path ("<Channels>");
gimp_item_factory_popup_with_data (item_factory, gimage);
}
static void
channels_menu_set_sensitivity (GimpImage *gimage)
channels_menu_update (GtkItemFactory *factory,
gpointer data)
{
GimpImage *gimage;
GimpChannel *channel;
gboolean fs;
GList *list;
GList *next = NULL;
GList *prev = NULL;
g_return_if_fail (gimage != NULL);
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gimage = GIMP_IMAGE (data);
channel = gimp_image_get_active_channel (gimage);
......@@ -633,18 +616,18 @@ channels_menu_set_sensitivity (GimpImage *gimage)
}
#define SET_SENSITIVE(menu,condition) \
gimp_menu_item_set_sensitive ("<Channels>/" menu, (condition) != 0)
SET_SENSITIVE ("New Channel...", !fs);
SET_SENSITIVE ("Raise Channel", !fs && channel && prev);
SET_SENSITIVE ("Lower Channel", !fs && channel && next);
SET_SENSITIVE ("Duplicate Channel", !fs && channel);
SET_SENSITIVE ("Channel to Selection", !fs && channel);
SET_SENSITIVE ("Add to Selection", !fs && channel);
SET_SENSITIVE ("Subtract from Selection", !fs && channel);
SET_SENSITIVE ("Intersect with Selection", !fs && channel);
SET_SENSITIVE ("Delete Channel", !fs && channel);
SET_SENSITIVE ("Edit Channel Attributes...", !fs && channel);
gimp_item_factory_set_sensitive (factory, menu, (condition) != 0)
SET_SENSITIVE ("/New Channel...", !fs);
SET_SENSITIVE ("/Raise Channel", !fs && channel && prev);
SET_SENSITIVE ("/Lower Channel", !fs && channel && next);
SET_SENSITIVE ("/Duplicate Channel", !fs && channel);
SET_SENSITIVE ("/Channel to Selection", !fs && channel);
SET_SENSITIVE ("/Add to Selection", !fs && channel);
SET_SENSITIVE ("/Subtract from Selection", !fs && channel);
SET_SENSITIVE ("/Intersect with Selection", !fs && channel);
SET_SENSITIVE ("/Delete Channel", !fs && channel);
SET_SENSITIVE ("/Edit Channel Attributes...", !fs && channel);
#undef SET_OPS_SENSITIVE
}
......@@ -43,7 +43,9 @@ void channels_edit_channel_attributes_cmd_callback (GtkWidget *widget,
void channels_new_channel_query (GimpImage *gimage);
void channels_edit_channel_query (GimpChannel *channel);
void channels_show_context_menu (GimpImage *gimage);
void channels_menu_update (GtkItemFactory *factory,
gpointer data);
#endif /* __CHANNELS_COMMANDS_H__ */
......@@ -30,6 +30,7 @@
#include "widgets/gimpdockable.h"
#include "widgets/gimpdockbook.h"
#include "widgets/gimpimagedock.h"
#include "widgets/gimpitemfactory.h"
#include "dialogs.h"
#include "dialogs-commands.h"
......@@ -286,8 +287,8 @@ dialogs_toggle_auto_cmd_callback (GtkWidget *widget,
void
dialogs_create_lc_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
gpointer data,
guint action)
{
GtkWidget *dock;
GtkWidget *dockbook;
......@@ -358,3 +359,99 @@ dialogs_create_stuff_cmd_callback (GtkWidget *widget,
gtk_widget_show (dock);
}
void
dialogs_menu_update (GtkItemFactory *factory,
gpointer data)
{
GimpDockbook *dockbook;
dockbook = GIMP_DOCKBOOK (data);
if (dockbook)
{
GimpDockable *dockable;
gint page_num;
GimpDialogFactoryEntry *entry;
GimpContainerView *view;
gboolean is_grid = FALSE;
GimpPreviewSize preview_size = GIMP_PREVIEW_SIZE_NONE;
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
dockable = (GimpDockable *)
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
entry = g_object_get_data (G_OBJECT (dockable),
"gimp-dialog-factory-entry");
if (entry)
{
if (strstr (entry->identifier, "grid"))
is_grid = TRUE;
}
view = gimp_container_view_get_by_dockable (dockable);
if (view)
{
preview_size = view->preview_size;
}
#define SET_ACTIVE(path,active) \
gimp_item_factory_set_active (factory, (path), (active))
if (preview_size >= GIMP_PREVIEW_SIZE_GIGANTIC)
{
SET_ACTIVE ("/Preview Size/Gigantic", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_ENORMOUS)
{
SET_ACTIVE ("/Preview Size/Enormous", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_HUGE)
{
SET_ACTIVE ("/Preview Size/Huge", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_EXTRA_LARGE)
{
SET_ACTIVE ("/Preview Size/Extra Large", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_LARGE)
{
SET_ACTIVE ("/Preview Size/Large", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_MEDIUM)
{
SET_ACTIVE ("/Preview Size/Medium", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_SMALL)
{
SET_ACTIVE ("/Preview Size/Small", TRUE);
}
else if (preview_size >= GIMP_PREVIEW_SIZE_EXTRA_SMALL)
{
SET_ACTIVE ("/Preview Size/Extra Small", TRUE);
}
else
{
SET_ACTIVE ("/Preview Size/Tiny", TRUE);
}
if (is_grid)
{
SET_ACTIVE ("/View as Grid", TRUE);
}
else
{
SET_ACTIVE ("/View as List", TRUE);
}
SET_ACTIVE ("/Show Image Menu",
GIMP_IMAGE_DOCK (dockbook->dock)->show_image_menu);
SET_ACTIVE ("/Auto Follow Active Image",
GIMP_IMAGE_DOCK (dockbook->dock)->auto_follow_active);
#undef SET_ACTIVE
}
}
......@@ -55,5 +55,8 @@ void dialogs_create_stuff_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void dialogs_menu_update (GtkItemFactory *factory,
gpointer data);
#endif /* __DIALOGS_COMMANDS_H__ */
......@@ -38,11 +38,6 @@
#include "libgimp/gimpintl.h"
/* local function prototypes */
static void documents_menu_set_sensitivity (GimpContainerEditor *editor);
/* public functionss */
void
......@@ -119,35 +114,24 @@ documents_refresh_documents_cmd_callback (GtkWidget *widget,
}
void
documents_show_context_menu (GimpContainerEditor *editor)
documents_menu_update (GtkItemFactory *factory,
gpointer data)
{
GtkItemFactory *item_factory;
documents_menu_set_sensitivity (editor);
item_factory = gtk_item_factory_from_path ("<Documents>");
GimpContainerEditor *editor;
GimpImagefile *imagefile;
gimp_item_factory_popup_with_data (item_factory, editor);
}
/* private functions */
static void
documents_menu_set_sensitivity (GimpContainerEditor *editor)
{
GimpImagefile *imagefile;
editor = GIMP_CONTAINER_EDITOR (data);
imagefile = gimp_context_get_imagefile (editor->view->context);
#define SET_SENSITIVE(menu,condition) \
gimp_menu_item_set_sensitive ("<Documents>/" menu, (condition) != 0)
gimp_item_factory_set_sensitive (factory, menu, (condition) != 0)
SET_SENSITIVE ("Open Image", imagefile);
SET_SENSITIVE ("Raise or Open Image", imagefile);
SET_SENSITIVE ("File Open Dialog...", TRUE);
SET_SENSITIVE ("Remove Entry", imagefile);
SET_SENSITIVE ("Refresh History", TRUE);
SET_SENSITIVE ("/Open Image", imagefile);
SET_SENSITIVE ("/Raise or Open Image", imagefile);
SET_SENSITIVE ("/File Open Dialog...", TRUE);
SET_SENSITIVE ("/Remove Entry", imagefile);
SET_SENSITIVE ("/Refresh History", TRUE);
#undef SET_SENSITIVE
}
......@@ -31,8 +31,8 @@ void documents_delete_document_cmd_callback (GtkWidget *widget,
void documents_refresh_documents_cmd_callback (GtkWidget *widget,
gpointer data);
void documents_show_context_menu (GimpContainerEditor *editor);
void documents_menu_update (GtkItemFactory *factory,
gpointer data);
#endif /* __DOCUMENTS_COMMANDS_H__ */
......@@ -40,7 +40,6 @@
/* local function prototypes */
static void gradient_editor_menu_set_sensitivity (GradientEditor *editor);
static void gradient_editor_left_color_changed (ColorNotebook *cnb,
const GimpRGB *color,
ColorNotebookState state,
......@@ -915,23 +914,10 @@ gradient_editor_blend_opacity_cmd_callback (GtkWidget *widget,
}
void
gradient_editor_show_context_menu (GradientEditor *editor)
{
GtkItemFactory *item_factory;
gradient_editor_menu_set_sensitivity (editor);
item_factory = gtk_item_factory_from_path ("<GradientEditor>");
gimp_item_factory_popup_with_data (item_factory, editor);
}
/* private functions */
static void
gradient_editor_menu_set_sensitivity (GradientEditor *editor)
gradient_editor_menu_update (GtkItemFactory *factory,
gpointer data)
{
GradientEditor *editor;
GimpGradientSegment *left_seg;
GimpGradientSegment *right_seg;
GimpRGB fg;
......@@ -941,6 +927,8 @@ gradient_editor_menu_set_sensitivity (GradientEditor *editor)
gboolean selection;
gboolean delete;
editor = (GradientEditor *) data;
if (editor->control_sel_l->prev)
left_seg = editor->control_sel_l->prev;
else
......@@ -981,161 +969,161 @@ gradient_editor_menu_set_sensitivity (GradientEditor *editor)
delete = (editor->control_sel_l->prev || editor->control_sel_r->next);
#define SET_ACTIVE(menu,active) \
gimp_menu_item_set_active ("<GradientEditor>/" menu, (active))
gimp_item_factory_set_active (factory, menu, (active))
#define SET_COLOR(menu,color,set_label) \
gimp_menu_item_set_color ("<GradientEditor>/" menu, (color), (set_label))
gimp_item_factory_set_color (factory, menu, (color), (set_label))
#define SET_LABEL(menu,label) \
gimp_menu_item_set_label ("<GradientEditor>/" menu, (label))
gimp_item_factory_set_label (factory, menu, (label))
#define SET_SENSITIVE(menu,condition) \
gimp_menu_item_set_sensitive ("<GradientEditor>/" menu, (condition) != 0)
gimp_item_factory_set_sensitive (factory, menu, (condition) != 0)
#define SET_VISIBLE(menu,condition) \
gimp_menu_item_set_visible ("<GradientEditor>/" menu, (condition) != 0)
gimp_item_factory_set_visible (factory, menu, (condition) != 0)
SET_COLOR ("Left Endpoint's Color...",
SET_COLOR ("/Left Endpoint's Color...",
&editor->control_sel_l->left_color, FALSE);
SET_COLOR ("Load Left Color From/Left Neighbor's Right Endpoint",
SET_COLOR ("/Load Left Color From/Left Neighbor's Right Endpoint",
&left_seg->right_color, FALSE);
SET_COLOR ("Load Left Color From/Right Endpoint",
SET_COLOR ("/Load Left Color From/Right Endpoint",
&editor->control_sel_r->right_color, FALSE);
SET_COLOR ("Load Left Color From/FG Color", &fg, FALSE);
SET_COLOR ("Load Left Color From/BG Color", &bg, FALSE);
SET_COLOR ("Load Left Color From/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("Load Left Color From/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("Load Left Color From/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("Load Left Color From/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("Load Left Color From/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("Load Left Color From/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("Load Left Color From/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("Load Left Color From/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("Load Left Color From/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("Load Left Color From/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("Save Left Color To/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("Save Left Color To/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("Save Left Color To/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("Save Left Color To/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("Save Left Color To/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("Save Left Color To/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("Save Left Color To/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("Save Left Color To/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("Save Left Color To/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("Save Left Color To/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("Right Endpoint's Color...",
SET_COLOR ("/Load Left Color From/FG Color", &fg, FALSE);
SET_COLOR ("/Load Left Color From/BG Color", &bg, FALSE);
SET_COLOR ("/Load Left Color From/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("/Load Left Color From/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("/Load Left Color From/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("/Load Left Color From/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("/Load Left Color From/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("/Load Left Color From/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("/Load Left Color From/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("/Load Left Color From/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("/Load Left Color From/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("/Load Left Color From/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("/Save Left Color To/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("/Save Left Color To/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("/Save Left Color To/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("/Save Left Color To/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("/Save Left Color To/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("/Save Left Color To/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("/Save Left Color To/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("/Save Left Color To/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("/Save Left Color To/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("/Save Left Color To/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("/Right Endpoint's Color...",
&editor->control_sel_r->right_color, FALSE);
SET_COLOR ("Load Right Color From/Right Neighbor's Left Endpoint",
SET_COLOR ("/Load Right Color From/Right Neighbor's Left Endpoint",
&right_seg->left_color, FALSE);
SET_COLOR ("Load Right Color From/Left Endpoint",
SET_COLOR ("/Load Right Color From/Left Endpoint",
&editor->control_sel_l->left_color, FALSE);
SET_COLOR ("Load Right Color From/FG Color", &fg, FALSE);
SET_COLOR ("Load Right Color From/BG Color", &bg, FALSE);
SET_COLOR ("Load Right Color From/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("Load Right Color From/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("Load Right Color From/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("Load Right Color From/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("Load Right Color From/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("Load Right Color From/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("Load Right Color From/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("Load Right Color From/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("Load Right Color From/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("Load Right Color From/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("Save Right Color To/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("Save Right Color To/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("Save Right Color To/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("Save Right Color To/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("Save Right Color To/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("Save Right Color To/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("Save Right Color To/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("Save Right Color To/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("Save Right Color To/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("Save Right Color To/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("/Load Right Color From/FG Color", &fg, FALSE);
SET_COLOR ("/Load Right Color From/BG Color", &bg, FALSE);
SET_COLOR ("/Load Right Color From/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("/Load Right Color From/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("/Load Right Color From/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("/Load Right Color From/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("/Load Right Color From/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("/Load Right Color From/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("/Load Right Color From/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("/Load Right Color From/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("/Load Right Color From/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("/Load Right Color From/10", &editor->saved_colors[9], TRUE);
SET_COLOR ("/Save Right Color To/01", &editor->saved_colors[0], TRUE);
SET_COLOR ("/Save Right Color To/02", &editor->saved_colors[1], TRUE);
SET_COLOR ("/Save Right Color To/03", &editor->saved_colors[2], TRUE);
SET_COLOR ("/Save Right Color To/04", &editor->saved_colors[3], TRUE);
SET_COLOR ("/Save Right Color To/05", &editor->saved_colors[4], TRUE);
SET_COLOR ("/Save Right Color To/06", &editor->saved_colors[5], TRUE);
SET_COLOR ("/Save Right Color To/07", &editor->saved_colors[6], TRUE);
SET_COLOR ("/Save Right Color To/08", &editor->saved_colors[7], TRUE);
SET_COLOR ("/Save Right Color To/09", &editor->saved_colors[8], TRUE);
SET_COLOR ("/Save Right Color To/10", &editor->saved_colors[9], TRUE);
if (! selection)
{
SET_LABEL ("flip", _("Flip Segment"));
SET_LABEL ("replicate", _("Replicate Segment"));
SET_LABEL ("blendingfunction", _("Blending Function for Segment"));
SET_LABEL ("coloringtype", _("Coloring Type for Segment"));
SET_LABEL ("splitmidpoint", _("Split Segment at Midpoint"));
SET_LABEL ("splituniformly", _("Split Segment Uniformly"));
SET_LABEL ("delete", _("Delete Segment"));
SET_LABEL ("recenter", _("Re-center Segment's Midpoint"));
SET_LABEL ("redistribute", _("Re-distribute Handles in Segment"));
SET_LABEL ("/flip", _("Flip Segment"));
SET_LABEL ("/replicate", _("Replicate Segment"));
SET_LABEL ("/blendingfunction", _("Blending Function for Segment"));
SET_LABEL ("/coloringtype", _("Coloring Type for Segment"));
SET_LABEL ("/splitmidpoint", _("Split Segment at Midpoint"));
SET_LABEL ("/splituniformly", _("Split Segment Uniformly"));
SET_LABEL ("/delete", _("Delete Segment"));
SET_LABEL ("/recenter", _("Re-center Segment's Midpoint"));
SET_LABEL ("/redistribute", _("Re-distribute Handles in Segment"));
}
else
{
SET_LABEL ("flip", _("Flip Selection"));
SET_LABEL ("replicate", _("Replicate Selection"));
SET_LABEL ("blendingfunction", _("Blending Function for Selection"));
SET_LABEL ("coloringtype", _("Coloring Type for Selection"));
SET_LABEL ("splitmidpoint", _("Split Segments at Midpoints"));
SET_LABEL ("splituniformly", _("Split Segments Uniformly"));
SET_LABEL ("delete", _("Delete Selection"));
SET_LABEL ("recenter", _("Re-center Midpoints in Selection"));
SET_LABEL ("redistribute", _("Re-distribute Handles in Selection"));
SET_LABEL ("/flip", _("Flip Selection"));
SET_LABEL ("/replicate", _("Replicate Selection"));
SET_LABEL ("/blendingfunction", _("Blending Function for Selection"));
SET_LABEL ("/coloringtype", _("Coloring Type for Selection"));
SET_LABEL ("/splitmidpoint", _("Split Segments at Midpoints"));
SET_LABEL ("/splituniformly", _("Split Segments Uniformly"));
SET_LABEL ("/delete", _("Delete Selection"));
SET_LABEL ("/recenter", _("Re-center Midpoints in Selection"));
SET_LABEL ("/redistribute", _("Re-distribute Handles in Selection"));
}
SET_SENSITIVE ("blendingfunction/(Varies)", FALSE);