Commit f4d7260c authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/actions/channels-actions.c app/actions/colormap-editor-actions.c

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

	* app/actions/channels-actions.c
	* app/actions/colormap-editor-actions.c
	* app/actions/documents-actions.c
	* app/actions/tool-options-actions.c
	* app/actions/vectors-actions.c: added more tooltips for actions
	which are used as extended dialog button callbacks.

	* app/widgets/gimpeditor.c (gimp_editor_add_action_button): keep
	the list of extended actions in reverse order.

	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpvectorstreeview.c: don't set the tooltips
	manually. Removes another bunch of insane translatable multiline
	format strings. Pass the extended actions in the right order
	to gimp_editor_add_action_button().
parent e1bfa9fe
2004-10-16 Michael Natterer <mitch@gimp.org>
* app/actions/channels-actions.c
* app/actions/colormap-editor-actions.c
* app/actions/documents-actions.c
* app/actions/tool-options-actions.c
* app/actions/vectors-actions.c: added more tooltips for actions
which are used as extended dialog button callbacks.
* app/widgets/gimpeditor.c (gimp_editor_add_action_button): keep
the list of extended actions in reverse order.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpvectorstreeview.c: don't set the tooltips
manually. Removes another bunch of insane translatable multiline
format strings. Pass the extended actions in the right order
to gimp_editor_add_action_button().
2004-10-16 Michael Natterer <mitch@gimp.org>
 
* app/actions/vectors-commands.c (vectors_linked_cmd_callback):
......
......@@ -101,22 +101,26 @@ static GimpActionEntry channels_actions[] =
static GimpEnumActionEntry channels_to_selection_actions[] =
{
{ "channels-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
N_("Channel to Sele_ction"), NULL, NULL,
N_("Channel to Sele_ction"), NULL,
N_("Channel to selection"),
GIMP_CHANNEL_OP_REPLACE,
GIMP_HELP_CHANNEL_SELECTION_REPLACE },
{ "channels-selection-add", GIMP_STOCK_SELECTION_ADD,
N_("_Add to Selection"), NULL, NULL,
N_("_Add to Selection"), NULL,
N_("Add"),
GIMP_CHANNEL_OP_ADD,
GIMP_HELP_CHANNEL_SELECTION_ADD },
{ "channels-selection-subtract", GIMP_STOCK_SELECTION_SUBTRACT,
N_("_Subtract from Selection"), NULL, NULL,
N_("_Subtract from Selection"), NULL,
N_("Subtract"),
GIMP_CHANNEL_OP_SUBTRACT,
GIMP_HELP_CHANNEL_SELECTION_SUBTRACT },
{ "channels-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT,
N_("_Intersect with Selection"), NULL, NULL,
N_("_Intersect with Selection"), NULL,
N_("Intersect"),
GIMP_CHANNEL_OP_INTERSECT,
GIMP_HELP_CHANNEL_SELECTION_INTERSECT }
};
......
......@@ -52,12 +52,14 @@ static GimpActionEntry colormap_editor_actions[] =
static GimpEnumActionEntry colormap_editor_add_color_actions[] =
{
{ "colormap-editor-add-color-from-fg", GTK_STOCK_ADD,
N_("_Add Color from FG"), "", NULL,
N_("_Add Color from FG"), "",
N_("Add color from FG"),
FALSE,
GIMP_HELP_INDEXED_PALETTE_ADD },
{ "colormap-editor-add-color-from-bg", GTK_STOCK_ADD,
N_("_Add Color from BG"), "", NULL,
N_("_Add Color from BG"), "",
N_("Add color from BG"),
TRUE,
GIMP_HELP_INDEXED_PALETTE_ADD }
};
......
......@@ -52,12 +52,14 @@ static GimpActionEntry colormap_editor_actions[] =
static GimpEnumActionEntry colormap_editor_add_color_actions[] =
{
{ "colormap-editor-add-color-from-fg", GTK_STOCK_ADD,
N_("_Add Color from FG"), "", NULL,
N_("_Add Color from FG"), "",
N_("Add color from FG"),
FALSE,
GIMP_HELP_INDEXED_PALETTE_ADD },
{ "colormap-editor-add-color-from-bg", GTK_STOCK_ADD,
N_("_Add Color from BG"), "", NULL,
N_("_Add Color from BG"), "",
N_("Add color from BG"),
TRUE,
GIMP_HELP_INDEXED_PALETTE_ADD }
};
......
......@@ -48,12 +48,14 @@ static GimpActionEntry documents_actions[] =
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-raise-or-open", GTK_STOCK_OPEN,
N_("_Raise or Open Image"), "", NULL,
N_("_Raise or Open Image"), "",
N_("Raise window if already open"),
G_CALLBACK (documents_raise_or_open_document_cmd_callback),
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-file-open-dialog", GTK_STOCK_OPEN,
N_("File Open _Dialog"), "", NULL,
N_("File Open _Dialog"), "",
N_("Open image dialog"),
G_CALLBACK (documents_file_open_dialog_cmd_callback),
GIMP_HELP_DOCUMENT_OPEN },
......@@ -70,12 +72,14 @@ static GimpActionEntry documents_actions[] =
GIMP_HELP_DOCUMENT_REFRESH },
{ "documents-reload-previews", GTK_STOCK_REFRESH,
N_("Reload _all Previews"), "", NULL,
N_("Reload _all Previews"), "",
N_("Reload all previews"),
G_CALLBACK (documents_reload_previews_cmd_callback),
GIMP_HELP_DOCUMENT_REFRESH },
{ "documents-remove-dangling", GTK_STOCK_REFRESH,
N_("Remove Dangling E_ntries"), "", NULL,
N_("Remove Dangling E_ntries"), "",
N_("Remove dangling entries"),
G_CALLBACK (documents_delete_dangling_documents_cmd_callback),
GIMP_HELP_DOCUMENT_REFRESH }
};
......
......@@ -71,12 +71,14 @@ static GimpActionEntry tool_options_actions[] =
GIMP_HELP_TOOL_OPTIONS_SAVE },
{ "tool-options-reset", GIMP_STOCK_RESET,
N_("R_eset Tool Options"), "", NULL,
N_("R_eset Tool Options"), "",
N_("Reset to default values"),
G_CALLBACK (tool_options_reset_cmd_callback),
GIMP_HELP_TOOL_OPTIONS_RESET },
{ "tool-options-reset-all", GIMP_STOCK_RESET,
N_("Reset _all Tool Options..."), "", NULL,
N_("Reset _all Tool Options..."), "",
N_("Reset all tool options"),
G_CALLBACK (tool_options_reset_all_cmd_callback),
GIMP_HELP_TOOL_OPTIONS_RESET }
};
......
......@@ -152,7 +152,8 @@ static GimpToggleActionEntry vectors_toggle_actions[] =
static GimpEnumActionEntry vectors_to_selection_actions[] =
{
{ "vectors-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
N_("Path to Sele_ction"), NULL, NULL,
N_("Path to Sele_ction"), NULL,
N_("Path to selection"),
GIMP_CHANNEL_OP_REPLACE,
GIMP_HELP_PATH_SELECTION_REPLACE },
......@@ -162,17 +163,20 @@ static GimpEnumActionEntry vectors_to_selection_actions[] =
GIMP_HELP_PATH_SELECTION_REPLACE },
{ "vectors-selection-add", GIMP_STOCK_SELECTION_ADD,
N_("_Add to Selection"), NULL, NULL,
N_("_Add to Selection"), NULL,
N_("Add"),
GIMP_CHANNEL_OP_ADD,
GIMP_HELP_PATH_SELECTION_ADD },
{ "vectors-selection-subtract", GIMP_STOCK_SELECTION_SUBTRACT,
N_("_Subtract from Selection"), NULL, NULL,
N_("_Subtract from Selection"), NULL,
N_("Subtract"),
GIMP_CHANNEL_OP_SUBTRACT,
GIMP_HELP_PATH_SELECTION_SUBTRACT },
{ "vectors-selection-intersect", GIMP_STOCK_SELECTION_INTERSECT,
N_("_Intersect with Selection"), NULL, NULL,
N_("_Intersect with Selection"), NULL,
N_("Intersect"),
GIMP_CHANNEL_OP_INTERSECT,
GIMP_HELP_PATH_SELECTION_INTERSECT }
};
......@@ -180,7 +184,8 @@ static GimpEnumActionEntry vectors_to_selection_actions[] =
static GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
{
{ "vectors-selection-to-vectors", GIMP_STOCK_SELECTION_TO_PATH,
N_("Selecti_on to Path"), NULL, NULL,
N_("Selecti_on to Path"), NULL,
N_("Selection to path"),
FALSE,
GIMP_HELP_SELECTION_TO_PATH },
......@@ -190,7 +195,8 @@ static GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
GIMP_HELP_SELECTION_TO_PATH },
{ "vectors-selection-to-vectors-advanced", GIMP_STOCK_SELECTION_TO_PATH,
N_("Selection to Path (_Advanced)"), NULL, NULL,
N_("Selection to Path (_Advanced)"), NULL,
N_("Advanced options"),
TRUE,
GIMP_HELP_SELECTION_TO_PATH }
};
......
......@@ -155,44 +155,27 @@ gimp_channel_tree_view_constructor (GType type,
GObject *object;
GimpEditor *editor;
GimpChannelTreeView *view;
gchar *str;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
editor = GIMP_EDITOR (object);
view = GIMP_CHANNEL_TREE_VIEW (object);
str = g_strdup_printf (_("Channel to selection\n"
"%s Add\n"
"%s Subtract\n"
"%s Intersect"),
gimp_get_mod_string (GDK_SHIFT_MASK),
gimp_get_mod_string (GDK_CONTROL_MASK),
gimp_get_mod_string (GDK_SHIFT_MASK |
GDK_CONTROL_MASK));
view->toselection_button =
gimp_editor_add_action_button (GIMP_EDITOR (view), "channels",
"channels-selection-replace",
"channels-selection-intersect",
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"channels-selection-subtract",
GDK_CONTROL_MASK,
"channels-selection-add",
GDK_SHIFT_MASK,
"channels-selection-subtract",
GDK_CONTROL_MASK,
"channels-selection-intersect",
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
NULL);
gimp_help_set_help_data (view->toselection_button, str,
GIMP_HELP_CHANNEL_SELECTION_REPLACE);
g_free (str);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (view)->button_box),
view->toselection_button, 5);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (view),
GTK_BUTTON (view->toselection_button),
GIMP_TYPE_CHANNEL);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (view)->button_box),
view->toselection_button, 5);
return object;
}
......
......@@ -280,7 +280,6 @@ gimp_colormap_editor_constructor (GType type,
{
GObject *object;
GimpColormapEditor *editor;
gchar *str;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
......@@ -294,17 +293,12 @@ gimp_colormap_editor_constructor (GType type,
NULL,
editor);
str = g_strdup_printf (_("Add color from FG\n%s from BG"),
gimp_get_mod_string (GDK_CONTROL_MASK));
editor->add_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "colormap-editor",
"colormap-editor-add-color-from-fg",
"colormap-editor-add-color-from-bg",
GDK_CONTROL_MASK,
NULL);
gimp_help_set_help_data (editor->add_button, str,
GIMP_HELP_INDEXED_PALETTE_ADD);
g_free (str);
return object;
}
......
......@@ -35,7 +35,6 @@
#include "gimpcontainerview.h"
#include "gimpdocumentview.h"
#include "gimpdnd.h"
#include "gimphelp-ids.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
......@@ -110,7 +109,6 @@ gimp_document_view_new (GimpViewType view_type,
{
GimpDocumentView *document_view;
GimpContainerEditor *editor;
gchar *str;
document_view = g_object_new (GIMP_TYPE_DOCUMENT_VIEW, NULL);
......@@ -127,12 +125,6 @@ gimp_document_view_new (GimpViewType view_type,
editor = GIMP_CONTAINER_EDITOR (document_view);
str = g_strdup_printf (_("Open the selected entry\n"
"%s Raise window if already open\n"
"%s Open image dialog"),
gimp_get_mod_string (GDK_SHIFT_MASK),
gimp_get_mod_string (GDK_CONTROL_MASK));
document_view->open_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), "documents",
"documents-open",
......@@ -141,14 +133,10 @@ gimp_document_view_new (GimpViewType view_type,
"documents-file-open-dialog",
GDK_CONTROL_MASK,
NULL);
gimp_help_set_help_data (document_view->open_button, str,
GIMP_HELP_DOCUMENT_OPEN);
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (document_view->open_button),
GIMP_TYPE_IMAGEFILE);
g_free (str);
document_view->remove_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), "documents",
"documents-remove", NULL);
......@@ -156,12 +144,6 @@ gimp_document_view_new (GimpViewType view_type,
GTK_BUTTON (document_view->remove_button),
GIMP_TYPE_IMAGEFILE);
str = g_strdup_printf (_("Recreate preview\n"
"%s Reload all previews\n"
"%s Remove Dangling Entries"),
gimp_get_mod_string (GDK_SHIFT_MASK),
gimp_get_mod_string (GDK_CONTROL_MASK));
document_view->refresh_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), "documents",
"documents-recreate-preview",
......@@ -170,10 +152,6 @@ gimp_document_view_new (GimpViewType view_type,
"documents-remove-dangling",
GDK_CONTROL_MASK,
NULL);
gimp_help_set_help_data (document_view->refresh_button, str,
GIMP_HELP_DOCUMENT_REFRESH);
g_free (str);
if (view_type == GIMP_VIEW_TYPE_LIST)
{
......
......@@ -619,7 +619,7 @@ gimp_editor_add_action_button (GimpEditor *editor,
ext->mod_mask = mod_mask;
ext->action = action;
extended = g_list_append (extended, ext);
extended = g_list_prepend (extended, ext);
if (tooltip)
{
......@@ -637,8 +637,6 @@ gimp_editor_add_action_button (GimpEditor *editor,
g_free (tooltip);
tooltip = tmp;
g_print ("created extended tooltip:\n%s\n\n", tooltip);
}
}
}
......
......@@ -449,7 +449,8 @@ gimp_item_tree_view_constructor (GType type,
item_view->new_button =
gimp_editor_add_action_button (editor, item_view_class->action_group,
item_view_class->new_default_action,
item_view_class->new_action, GDK_SHIFT_MASK,
item_view_class->new_action,
GDK_SHIFT_MASK,
NULL);
/* connect "drop to new" manually as it makes a difference whether
* it was clicked or dropped
......
......@@ -408,19 +408,18 @@ gimp_layer_tree_view_constructor (GType type,
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_PATTERN,
NULL, tree_view);
/* Hide basically useless Edit button */
/* hide basically useless edit button */
gtk_widget_hide (GIMP_ITEM_TREE_VIEW (layer_view)->edit_button);
layer_view->anchor_button =
gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
"layers-anchor", NULL);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (layer_view)->button_box),
layer_view->anchor_button, 5);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (layer_view),
GTK_BUTTON (layer_view->anchor_button),
GIMP_TYPE_LAYER);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (layer_view)->button_box),
layer_view->anchor_button, 5);
return object;
}
......
......@@ -44,7 +44,6 @@
#include "gimpselectioneditor.h"
#include "gimpdnd.h"
#include "gimphelp-ids.h"
#include "gimpmenufactory.h"
#include "gimpview.h"
#include "gimpviewrenderer.h"
......@@ -158,7 +157,6 @@ gimp_selection_editor_constructor (GType type,
{
GObject *object;
GimpSelectionEditor *editor;
gchar *str;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
......@@ -180,20 +178,12 @@ gimp_selection_editor_constructor (GType type,
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
"select-save", NULL);
str = g_strdup_printf (_("Selection to path\n"
"%s Advanced options"),
gimp_get_mod_string (GDK_SHIFT_MASK));
editor->path_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "vectors",
"vectors-selection-to-vectors",
"vectors-selection-to-vectors-advanced",
GDK_SHIFT_MASK,
NULL);
gimp_help_set_help_data (editor->path_button, str,
GIMP_HELP_SELECTION_TO_PATH);
g_free (str);
editor->stroke_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
......
......@@ -175,7 +175,6 @@ gimp_tool_options_editor_constructor (GType type,
{
GObject *object;
GimpToolOptionsEditor *editor;
gchar *str;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
......@@ -205,18 +204,12 @@ gimp_tool_options_editor_constructor (GType type,
NULL,
editor);
str = g_strdup_printf (_("Reset to default values\n"
"%s Reset all Tool Options"),
gimp_get_mod_string (GDK_SHIFT_MASK));
editor->reset_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "tool-options",
"tool-options-reset",
"tool-options-reset-all",
GDK_SHIFT_MASK,
NULL);
gimp_help_set_help_data (editor->reset_button, str,
GIMP_HELP_TOOL_OPTIONS_RESET);
g_free (str);
return object;
}
......
......@@ -41,7 +41,6 @@
#include "gimpcontainerview.h"
#include "gimpvectorstreeview.h"
#include "gimpdnd.h"
#include "gimphelp-ids.h"
#include "gimpwidgets-utils.h"
#include "gimp-intl.h"
......@@ -136,7 +135,7 @@ gimp_vectors_tree_view_class_init (GimpVectorsTreeViewClass *klass)
item_view_class->new_item = gimp_vectors_tree_view_item_new;
item_view_class->action_group = "vectors";
item_view_class->activate_action = "vectors-vectors-tool";
item_view_class->activate_action = "vectors-path-tool";
item_view_class->edit_action = "vectors-edit-attributes";
item_view_class->new_action = "vectors-new";
item_view_class->new_default_action = "vectors-new-default";
......@@ -171,7 +170,6 @@ gimp_vectors_tree_view_constructor (GType type,
GimpEditor *editor;
GimpContainerTreeView *tree_view;
GimpVectorsTreeView *view;
gchar *str;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
......@@ -179,38 +177,24 @@ gimp_vectors_tree_view_constructor (GType type,
tree_view = GIMP_CONTAINER_TREE_VIEW (object);
view = GIMP_VECTORS_TREE_VIEW (object);
/* Hide basically useless Edit button */
/* hide basically useless edit button */
gtk_widget_hide (GIMP_ITEM_TREE_VIEW (view)->edit_button);
str = g_strdup_printf (_("Path to Selection\n"
"%s Add\n"
"%s Subtract\n"
"%s Intersect"),
gimp_get_mod_string (GDK_SHIFT_MASK),
gimp_get_mod_string (GDK_CONTROL_MASK),
gimp_get_mod_string (GDK_SHIFT_MASK |
GDK_CONTROL_MASK));
view->toselection_button =
gimp_editor_add_action_button (editor, "vectors",
"vectors-selection-replace",
"vectors-selection-intersect",
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"vectors-selection-subtract",
GDK_CONTROL_MASK,
"vectors-selection-add",
GDK_SHIFT_MASK,
"vectors-selection-subtract",
GDK_CONTROL_MASK,
"vectors-selection-intersect",
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
NULL);
gimp_help_set_help_data (view->toselection_button, str,
GIMP_HELP_PATH_SELECTION_REPLACE);
g_free (str);
str = g_strdup_printf (_("Selection to Path\n"
"%s Advanced Options"),
gimp_get_mod_string (GDK_SHIFT_MASK));
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
GTK_BUTTON (view->toselection_button),
GIMP_TYPE_VECTORS);
gtk_box_reorder_child (GTK_BOX (editor->button_box),
view->toselection_button, 5);
view->tovectors_button =
gimp_editor_add_action_button (editor, "vectors",
......@@ -218,32 +202,20 @@ gimp_vectors_tree_view_constructor (GType type,
"vectors-selection-to-vectors-advanced",
GDK_SHIFT_MASK,
NULL);
gimp_help_set_help_data (view->tovectors_button, str,
GIMP_HELP_SELECTION_TO_PATH);
g_free (str);
gtk_box_reorder_child (GTK_BOX (editor->button_box),
view->tovectors_button, 6);
view->stroke_button =
gimp_editor_add_action_button (editor, "vectors",
"vectors-stroke", NULL);
gtk_box_reorder_child (GTK_BOX (editor->button_box),
view->toselection_button, 5);
gtk_box_reorder_child (GTK_BOX (editor->button_box),
view->tovectors_button, 6);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
GTK_BUTTON (view->stroke_button),
GIMP_TYPE_VECTORS);
gtk_box_reorder_child (GTK_BOX (editor->button_box),
view->stroke_button, 7);
gimp_dnd_svg_dest_add (GTK_WIDGET (tree_view->view), NULL, view);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
GTK_BUTTON (view->toselection_button),
GIMP_TYPE_VECTORS);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
GTK_BUTTON (view->stroke_button),
GIMP_TYPE_VECTORS);
return object;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment