mirror of https://github.com/GNOME/gimp.git
accidentially replaced "Gradient:" with "Blend:" in my last checkin to
1999-11-26 Michael Natterer <mitch@gimp.org> * app/blend.c: accidentially replaced "Gradient:" with "Blend:" in my last checkin to this file. Put the right string back. * app/menus.c: fixed the plugin translation problem (YES!!! :-) Mysteriously, using g_strdup() et al. instead of composing the string to translate in a statically allocated array fixed the problem. * plug-ins/gap/gap_main.c: fixed a menu path.
This commit is contained in:
parent
ee4d8837cf
commit
bbda88d670
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
1999-11-26 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/blend.c: accidentially replaced "Gradient:" with "Blend:" in
|
||||||
|
my last checkin to this file. Put the right string back.
|
||||||
|
|
||||||
|
* app/menus.c: fixed the plugin translation problem (YES!!! :-)
|
||||||
|
Mysteriously, using g_strdup() et al. instead of composing the
|
||||||
|
string to translate in a statically allocated array fixed the
|
||||||
|
problem.
|
||||||
|
|
||||||
|
* plug-ins/gap/gap_main.c: fixed a menu path.
|
||||||
|
|
||||||
Fri Nov 26 01:33:04 MET 1999 Sven Neumann <sven@gimp.org>
|
Fri Nov 26 01:33:04 MET 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/histogram_tool.c: purely cosmetic change
|
* app/histogram_tool.c: purely cosmetic change
|
||||||
|
|
20
app/blend.c
20
app/blend.c
|
@ -331,12 +331,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
||||||
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->offset);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Offset:"), 1.0, 1.0,
|
_("Offset:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->offset);
|
||||||
|
|
||||||
/* the blend mode menu */
|
/* the blend mode menu */
|
||||||
options->blend_mode_w = gtk_option_menu_new ();
|
options->blend_mode_w = gtk_option_menu_new ();
|
||||||
|
@ -351,7 +351,7 @@ blend_options_new ()
|
||||||
menu = build_menu (gradient_option_items, NULL);
|
menu = build_menu (gradient_option_items, NULL);
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
||||||
_("Blend:"), 1.0, 0.5,
|
_("Gradient:"), 1.0, 0.5,
|
||||||
options->gradient_type_w, TRUE);
|
options->gradient_type_w, TRUE);
|
||||||
|
|
||||||
/* the repeat option */
|
/* the repeat option */
|
||||||
|
@ -405,12 +405,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_int_adjustment_update,
|
|
||||||
&options->max_depth);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Max Depth:"), 1.0, 1.0,
|
_("Max Depth:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_int_adjustment_update,
|
||||||
|
&options->max_depth);
|
||||||
|
|
||||||
/* threshold scale */
|
/* threshold scale */
|
||||||
options->threshold_w =
|
options->threshold_w =
|
||||||
|
@ -418,12 +418,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->threshold);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Threshold:"), 1.0, 1.0,
|
_("Threshold:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->threshold);
|
||||||
|
|
||||||
/* show the table */
|
/* show the table */
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
|
@ -331,12 +331,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
||||||
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->offset);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Offset:"), 1.0, 1.0,
|
_("Offset:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->offset);
|
||||||
|
|
||||||
/* the blend mode menu */
|
/* the blend mode menu */
|
||||||
options->blend_mode_w = gtk_option_menu_new ();
|
options->blend_mode_w = gtk_option_menu_new ();
|
||||||
|
@ -351,7 +351,7 @@ blend_options_new ()
|
||||||
menu = build_menu (gradient_option_items, NULL);
|
menu = build_menu (gradient_option_items, NULL);
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
||||||
_("Blend:"), 1.0, 0.5,
|
_("Gradient:"), 1.0, 0.5,
|
||||||
options->gradient_type_w, TRUE);
|
options->gradient_type_w, TRUE);
|
||||||
|
|
||||||
/* the repeat option */
|
/* the repeat option */
|
||||||
|
@ -405,12 +405,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_int_adjustment_update,
|
|
||||||
&options->max_depth);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Max Depth:"), 1.0, 1.0,
|
_("Max Depth:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_int_adjustment_update,
|
||||||
|
&options->max_depth);
|
||||||
|
|
||||||
/* threshold scale */
|
/* threshold scale */
|
||||||
options->threshold_w =
|
options->threshold_w =
|
||||||
|
@ -418,12 +418,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->threshold);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Threshold:"), 1.0, 1.0,
|
_("Threshold:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->threshold);
|
||||||
|
|
||||||
/* show the table */
|
/* show the table */
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
116
app/gui/menus.c
116
app/gui/menus.c
|
@ -66,11 +66,43 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
||||||
{
|
{
|
||||||
|
/* <Toolbox> */
|
||||||
|
N_("/Xtns/Animation"),
|
||||||
|
N_("/Xtns/Perl-Fu"),
|
||||||
|
N_("/Xtns/Perl-Fu/Logos"),
|
||||||
|
N_("/Xtns/Perl"),
|
||||||
|
N_("/Xtns/Render"),
|
||||||
|
N_("/Xtns/Render/Logos"),
|
||||||
|
N_("/Xtns/Render/Povray"),
|
||||||
|
N_("/Xtns/Script-Fu"),
|
||||||
|
N_("/Xtns/Script-Fu/Logos"),
|
||||||
|
N_("/Xtns/Script-Fu/Patterns"),
|
||||||
|
N_("/Xtns/Script-Fu/Web page themes"),
|
||||||
|
N_("/Xtns/Script-Fu/Utils"),
|
||||||
|
N_("/Xtns/Script-Fu/Buttons"),
|
||||||
|
N_("/Xtns/Script-Fu/Make Brush"),
|
||||||
|
N_("/Xtns/Script-Fu/Misc"),
|
||||||
|
N_("/Xtns/Script-Fu/Test"),
|
||||||
|
N_("/Xtns/Web Browser"),
|
||||||
|
|
||||||
|
/* <Image> */
|
||||||
|
N_("/Filters/Colors/Map"),
|
||||||
N_("/Filters/Render/Clouds"),
|
N_("/Filters/Render/Clouds"),
|
||||||
N_("/Filters/Render/Nature"),
|
N_("/Filters/Render/Nature"),
|
||||||
N_("/Filters/Render/Pattern"),
|
N_("/Filters/Render/Pattern"),
|
||||||
N_("/Filters/Colors/Map"),
|
N_("/Filters/Misc"),
|
||||||
N_("/Filters/Misc")
|
N_("/Script-Fu/Decor"),
|
||||||
|
N_("/Script-Fu/Modify"),
|
||||||
|
N_("/Script-Fu/Utils"),
|
||||||
|
N_("/Script-Fu/Animators"),
|
||||||
|
N_("/Script-Fu/Stencil Ops"),
|
||||||
|
N_("/Script-Fu/Alchemy"),
|
||||||
|
N_("/Script-Fu/Selection"),
|
||||||
|
N_("/Script-Fu/Shadow"),
|
||||||
|
N_("/Script-Fu/Render"),
|
||||||
|
N_("/Guides"),
|
||||||
|
N_("Video"),
|
||||||
|
N_("Video/Encode")
|
||||||
};
|
};
|
||||||
|
|
||||||
static GSList *last_opened_raw_filenames = NULL;
|
static GSList *last_opened_raw_filenames = NULL;
|
||||||
|
@ -993,8 +1025,18 @@ menus_reorder_plugins (void)
|
||||||
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
||||||
sizeof (image_file_entries[0]));
|
sizeof (image_file_entries[0]));
|
||||||
|
|
||||||
GtkWidget *menu;
|
static gchar *reorder_submenus[] = { "<Image>/Video" };
|
||||||
|
static gint n_reorder_submenus = (sizeof (reorder_submenus) /
|
||||||
|
sizeof (reorder_submenus[0]));
|
||||||
|
|
||||||
|
static gchar *reorder_sub_submenus[] = { "<Image>/Filters",
|
||||||
|
"<Toolbox>/Xtns" };
|
||||||
|
static gint n_reorder_sub_submenus = (sizeof (reorder_sub_submenus) /
|
||||||
|
sizeof (reorder_sub_submenus[0]));
|
||||||
|
|
||||||
|
GtkItemFactory *item_factory;
|
||||||
GtkWidget *menu_item;
|
GtkWidget *menu_item;
|
||||||
|
GtkWidget *menu;
|
||||||
GList *list;
|
GList *list;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gint i, pos;
|
gint i, pos;
|
||||||
|
@ -1060,36 +1102,38 @@ menus_reorder_plugins (void)
|
||||||
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Image>/Filters menu... */
|
/* Reorder menus where plugins registered submenus */
|
||||||
menu_item = gtk_item_factory_get_widget (image_factory,
|
for (i = 0; i < n_reorder_submenus; i++)
|
||||||
"/Filters/Repeat last");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Toolbox>/Xtns menu... */
|
for (i = 0; i < n_reorder_sub_submenus; i++)
|
||||||
menu_item = gtk_item_factory_get_widget (toolbox_factory,
|
|
||||||
"/Xtns/Module Browser...");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_sub_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_sub_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
for (list = GTK_MENU_SHELL (menu)->children; list;
|
||||||
|
list = g_list_next (list))
|
||||||
|
{
|
||||||
|
GtkMenuItem *menu_item;
|
||||||
|
|
||||||
|
menu_item = GTK_MENU_ITEM (list->data);
|
||||||
|
|
||||||
|
if (menu_item->submenu)
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,32 +1662,34 @@ menus_init (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MENUPATH_SIZE 384
|
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
menu_translate (const gchar *path,
|
menu_translate (const gchar *path,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
static gchar menupath[MENUPATH_SIZE];
|
static gchar *menupath = NULL;
|
||||||
|
|
||||||
gchar *retval;
|
gchar *retval;
|
||||||
gchar *factory;
|
gchar *factory;
|
||||||
|
|
||||||
factory = (gchar *) data;
|
factory = (gchar *) data;
|
||||||
|
|
||||||
menupath[MENUPATH_SIZE - 1] = '\0';
|
if (menupath)
|
||||||
strncpy (menupath, path, MENUPATH_SIZE -1);
|
g_free (menupath);
|
||||||
|
|
||||||
|
menupath = g_strdup (path);
|
||||||
|
|
||||||
if ((strstr (path, "/tearoff1") != NULL) ||
|
if ((strstr (path, "/tearoff1") != NULL) ||
|
||||||
(strstr (path, "/---") != NULL) ||
|
(strstr (path, "/---") != NULL) ||
|
||||||
(strstr (path, "/MRU") != NULL))
|
(strstr (path, "/MRU") != NULL))
|
||||||
return menupath;
|
return menupath;
|
||||||
|
|
||||||
retval = gettext (path);
|
retval = gettext (menupath);
|
||||||
|
|
||||||
if (!strcmp (path, retval) && factory)
|
if (!strcmp (path, retval) && factory)
|
||||||
{
|
{
|
||||||
strcpy (menupath, factory);
|
g_free (menupath);
|
||||||
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen (factory));
|
|
||||||
|
menupath = g_strconcat (factory, path, NULL);
|
||||||
|
|
||||||
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
||||||
}
|
}
|
||||||
|
|
116
app/menus.c
116
app/menus.c
|
@ -66,11 +66,43 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
||||||
{
|
{
|
||||||
|
/* <Toolbox> */
|
||||||
|
N_("/Xtns/Animation"),
|
||||||
|
N_("/Xtns/Perl-Fu"),
|
||||||
|
N_("/Xtns/Perl-Fu/Logos"),
|
||||||
|
N_("/Xtns/Perl"),
|
||||||
|
N_("/Xtns/Render"),
|
||||||
|
N_("/Xtns/Render/Logos"),
|
||||||
|
N_("/Xtns/Render/Povray"),
|
||||||
|
N_("/Xtns/Script-Fu"),
|
||||||
|
N_("/Xtns/Script-Fu/Logos"),
|
||||||
|
N_("/Xtns/Script-Fu/Patterns"),
|
||||||
|
N_("/Xtns/Script-Fu/Web page themes"),
|
||||||
|
N_("/Xtns/Script-Fu/Utils"),
|
||||||
|
N_("/Xtns/Script-Fu/Buttons"),
|
||||||
|
N_("/Xtns/Script-Fu/Make Brush"),
|
||||||
|
N_("/Xtns/Script-Fu/Misc"),
|
||||||
|
N_("/Xtns/Script-Fu/Test"),
|
||||||
|
N_("/Xtns/Web Browser"),
|
||||||
|
|
||||||
|
/* <Image> */
|
||||||
|
N_("/Filters/Colors/Map"),
|
||||||
N_("/Filters/Render/Clouds"),
|
N_("/Filters/Render/Clouds"),
|
||||||
N_("/Filters/Render/Nature"),
|
N_("/Filters/Render/Nature"),
|
||||||
N_("/Filters/Render/Pattern"),
|
N_("/Filters/Render/Pattern"),
|
||||||
N_("/Filters/Colors/Map"),
|
N_("/Filters/Misc"),
|
||||||
N_("/Filters/Misc")
|
N_("/Script-Fu/Decor"),
|
||||||
|
N_("/Script-Fu/Modify"),
|
||||||
|
N_("/Script-Fu/Utils"),
|
||||||
|
N_("/Script-Fu/Animators"),
|
||||||
|
N_("/Script-Fu/Stencil Ops"),
|
||||||
|
N_("/Script-Fu/Alchemy"),
|
||||||
|
N_("/Script-Fu/Selection"),
|
||||||
|
N_("/Script-Fu/Shadow"),
|
||||||
|
N_("/Script-Fu/Render"),
|
||||||
|
N_("/Guides"),
|
||||||
|
N_("Video"),
|
||||||
|
N_("Video/Encode")
|
||||||
};
|
};
|
||||||
|
|
||||||
static GSList *last_opened_raw_filenames = NULL;
|
static GSList *last_opened_raw_filenames = NULL;
|
||||||
|
@ -993,8 +1025,18 @@ menus_reorder_plugins (void)
|
||||||
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
||||||
sizeof (image_file_entries[0]));
|
sizeof (image_file_entries[0]));
|
||||||
|
|
||||||
GtkWidget *menu;
|
static gchar *reorder_submenus[] = { "<Image>/Video" };
|
||||||
|
static gint n_reorder_submenus = (sizeof (reorder_submenus) /
|
||||||
|
sizeof (reorder_submenus[0]));
|
||||||
|
|
||||||
|
static gchar *reorder_sub_submenus[] = { "<Image>/Filters",
|
||||||
|
"<Toolbox>/Xtns" };
|
||||||
|
static gint n_reorder_sub_submenus = (sizeof (reorder_sub_submenus) /
|
||||||
|
sizeof (reorder_sub_submenus[0]));
|
||||||
|
|
||||||
|
GtkItemFactory *item_factory;
|
||||||
GtkWidget *menu_item;
|
GtkWidget *menu_item;
|
||||||
|
GtkWidget *menu;
|
||||||
GList *list;
|
GList *list;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gint i, pos;
|
gint i, pos;
|
||||||
|
@ -1060,36 +1102,38 @@ menus_reorder_plugins (void)
|
||||||
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Image>/Filters menu... */
|
/* Reorder menus where plugins registered submenus */
|
||||||
menu_item = gtk_item_factory_get_widget (image_factory,
|
for (i = 0; i < n_reorder_submenus; i++)
|
||||||
"/Filters/Repeat last");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Toolbox>/Xtns menu... */
|
for (i = 0; i < n_reorder_sub_submenus; i++)
|
||||||
menu_item = gtk_item_factory_get_widget (toolbox_factory,
|
|
||||||
"/Xtns/Module Browser...");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_sub_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_sub_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
for (list = GTK_MENU_SHELL (menu)->children; list;
|
||||||
|
list = g_list_next (list))
|
||||||
|
{
|
||||||
|
GtkMenuItem *menu_item;
|
||||||
|
|
||||||
|
menu_item = GTK_MENU_ITEM (list->data);
|
||||||
|
|
||||||
|
if (menu_item->submenu)
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,32 +1662,34 @@ menus_init (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MENUPATH_SIZE 384
|
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
menu_translate (const gchar *path,
|
menu_translate (const gchar *path,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
static gchar menupath[MENUPATH_SIZE];
|
static gchar *menupath = NULL;
|
||||||
|
|
||||||
gchar *retval;
|
gchar *retval;
|
||||||
gchar *factory;
|
gchar *factory;
|
||||||
|
|
||||||
factory = (gchar *) data;
|
factory = (gchar *) data;
|
||||||
|
|
||||||
menupath[MENUPATH_SIZE - 1] = '\0';
|
if (menupath)
|
||||||
strncpy (menupath, path, MENUPATH_SIZE -1);
|
g_free (menupath);
|
||||||
|
|
||||||
|
menupath = g_strdup (path);
|
||||||
|
|
||||||
if ((strstr (path, "/tearoff1") != NULL) ||
|
if ((strstr (path, "/tearoff1") != NULL) ||
|
||||||
(strstr (path, "/---") != NULL) ||
|
(strstr (path, "/---") != NULL) ||
|
||||||
(strstr (path, "/MRU") != NULL))
|
(strstr (path, "/MRU") != NULL))
|
||||||
return menupath;
|
return menupath;
|
||||||
|
|
||||||
retval = gettext (path);
|
retval = gettext (menupath);
|
||||||
|
|
||||||
if (!strcmp (path, retval) && factory)
|
if (!strcmp (path, retval) && factory)
|
||||||
{
|
{
|
||||||
strcpy (menupath, factory);
|
g_free (menupath);
|
||||||
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen (factory));
|
|
||||||
|
menupath = g_strconcat (factory, path, NULL);
|
||||||
|
|
||||||
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,43 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
||||||
{
|
{
|
||||||
|
/* <Toolbox> */
|
||||||
|
N_("/Xtns/Animation"),
|
||||||
|
N_("/Xtns/Perl-Fu"),
|
||||||
|
N_("/Xtns/Perl-Fu/Logos"),
|
||||||
|
N_("/Xtns/Perl"),
|
||||||
|
N_("/Xtns/Render"),
|
||||||
|
N_("/Xtns/Render/Logos"),
|
||||||
|
N_("/Xtns/Render/Povray"),
|
||||||
|
N_("/Xtns/Script-Fu"),
|
||||||
|
N_("/Xtns/Script-Fu/Logos"),
|
||||||
|
N_("/Xtns/Script-Fu/Patterns"),
|
||||||
|
N_("/Xtns/Script-Fu/Web page themes"),
|
||||||
|
N_("/Xtns/Script-Fu/Utils"),
|
||||||
|
N_("/Xtns/Script-Fu/Buttons"),
|
||||||
|
N_("/Xtns/Script-Fu/Make Brush"),
|
||||||
|
N_("/Xtns/Script-Fu/Misc"),
|
||||||
|
N_("/Xtns/Script-Fu/Test"),
|
||||||
|
N_("/Xtns/Web Browser"),
|
||||||
|
|
||||||
|
/* <Image> */
|
||||||
|
N_("/Filters/Colors/Map"),
|
||||||
N_("/Filters/Render/Clouds"),
|
N_("/Filters/Render/Clouds"),
|
||||||
N_("/Filters/Render/Nature"),
|
N_("/Filters/Render/Nature"),
|
||||||
N_("/Filters/Render/Pattern"),
|
N_("/Filters/Render/Pattern"),
|
||||||
N_("/Filters/Colors/Map"),
|
N_("/Filters/Misc"),
|
||||||
N_("/Filters/Misc")
|
N_("/Script-Fu/Decor"),
|
||||||
|
N_("/Script-Fu/Modify"),
|
||||||
|
N_("/Script-Fu/Utils"),
|
||||||
|
N_("/Script-Fu/Animators"),
|
||||||
|
N_("/Script-Fu/Stencil Ops"),
|
||||||
|
N_("/Script-Fu/Alchemy"),
|
||||||
|
N_("/Script-Fu/Selection"),
|
||||||
|
N_("/Script-Fu/Shadow"),
|
||||||
|
N_("/Script-Fu/Render"),
|
||||||
|
N_("/Guides"),
|
||||||
|
N_("Video"),
|
||||||
|
N_("Video/Encode")
|
||||||
};
|
};
|
||||||
|
|
||||||
static GSList *last_opened_raw_filenames = NULL;
|
static GSList *last_opened_raw_filenames = NULL;
|
||||||
|
@ -993,8 +1025,18 @@ menus_reorder_plugins (void)
|
||||||
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
||||||
sizeof (image_file_entries[0]));
|
sizeof (image_file_entries[0]));
|
||||||
|
|
||||||
GtkWidget *menu;
|
static gchar *reorder_submenus[] = { "<Image>/Video" };
|
||||||
|
static gint n_reorder_submenus = (sizeof (reorder_submenus) /
|
||||||
|
sizeof (reorder_submenus[0]));
|
||||||
|
|
||||||
|
static gchar *reorder_sub_submenus[] = { "<Image>/Filters",
|
||||||
|
"<Toolbox>/Xtns" };
|
||||||
|
static gint n_reorder_sub_submenus = (sizeof (reorder_sub_submenus) /
|
||||||
|
sizeof (reorder_sub_submenus[0]));
|
||||||
|
|
||||||
|
GtkItemFactory *item_factory;
|
||||||
GtkWidget *menu_item;
|
GtkWidget *menu_item;
|
||||||
|
GtkWidget *menu;
|
||||||
GList *list;
|
GList *list;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gint i, pos;
|
gint i, pos;
|
||||||
|
@ -1060,36 +1102,38 @@ menus_reorder_plugins (void)
|
||||||
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Image>/Filters menu... */
|
/* Reorder menus where plugins registered submenus */
|
||||||
menu_item = gtk_item_factory_get_widget (image_factory,
|
for (i = 0; i < n_reorder_submenus; i++)
|
||||||
"/Filters/Repeat last");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Toolbox>/Xtns menu... */
|
for (i = 0; i < n_reorder_sub_submenus; i++)
|
||||||
menu_item = gtk_item_factory_get_widget (toolbox_factory,
|
|
||||||
"/Xtns/Module Browser...");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_sub_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_sub_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
for (list = GTK_MENU_SHELL (menu)->children; list;
|
||||||
|
list = g_list_next (list))
|
||||||
|
{
|
||||||
|
GtkMenuItem *menu_item;
|
||||||
|
|
||||||
|
menu_item = GTK_MENU_ITEM (list->data);
|
||||||
|
|
||||||
|
if (menu_item->submenu)
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,32 +1662,34 @@ menus_init (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MENUPATH_SIZE 384
|
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
menu_translate (const gchar *path,
|
menu_translate (const gchar *path,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
static gchar menupath[MENUPATH_SIZE];
|
static gchar *menupath = NULL;
|
||||||
|
|
||||||
gchar *retval;
|
gchar *retval;
|
||||||
gchar *factory;
|
gchar *factory;
|
||||||
|
|
||||||
factory = (gchar *) data;
|
factory = (gchar *) data;
|
||||||
|
|
||||||
menupath[MENUPATH_SIZE - 1] = '\0';
|
if (menupath)
|
||||||
strncpy (menupath, path, MENUPATH_SIZE -1);
|
g_free (menupath);
|
||||||
|
|
||||||
|
menupath = g_strdup (path);
|
||||||
|
|
||||||
if ((strstr (path, "/tearoff1") != NULL) ||
|
if ((strstr (path, "/tearoff1") != NULL) ||
|
||||||
(strstr (path, "/---") != NULL) ||
|
(strstr (path, "/---") != NULL) ||
|
||||||
(strstr (path, "/MRU") != NULL))
|
(strstr (path, "/MRU") != NULL))
|
||||||
return menupath;
|
return menupath;
|
||||||
|
|
||||||
retval = gettext (path);
|
retval = gettext (menupath);
|
||||||
|
|
||||||
if (!strcmp (path, retval) && factory)
|
if (!strcmp (path, retval) && factory)
|
||||||
{
|
{
|
||||||
strcpy (menupath, factory);
|
g_free (menupath);
|
||||||
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen (factory));
|
|
||||||
|
menupath = g_strconcat (factory, path, NULL);
|
||||||
|
|
||||||
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,12 +331,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
||||||
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->offset);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Offset:"), 1.0, 1.0,
|
_("Offset:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->offset);
|
||||||
|
|
||||||
/* the blend mode menu */
|
/* the blend mode menu */
|
||||||
options->blend_mode_w = gtk_option_menu_new ();
|
options->blend_mode_w = gtk_option_menu_new ();
|
||||||
|
@ -351,7 +351,7 @@ blend_options_new ()
|
||||||
menu = build_menu (gradient_option_items, NULL);
|
menu = build_menu (gradient_option_items, NULL);
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
||||||
_("Blend:"), 1.0, 0.5,
|
_("Gradient:"), 1.0, 0.5,
|
||||||
options->gradient_type_w, TRUE);
|
options->gradient_type_w, TRUE);
|
||||||
|
|
||||||
/* the repeat option */
|
/* the repeat option */
|
||||||
|
@ -405,12 +405,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_int_adjustment_update,
|
|
||||||
&options->max_depth);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Max Depth:"), 1.0, 1.0,
|
_("Max Depth:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_int_adjustment_update,
|
||||||
|
&options->max_depth);
|
||||||
|
|
||||||
/* threshold scale */
|
/* threshold scale */
|
||||||
options->threshold_w =
|
options->threshold_w =
|
||||||
|
@ -418,12 +418,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->threshold);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Threshold:"), 1.0, 1.0,
|
_("Threshold:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->threshold);
|
||||||
|
|
||||||
/* show the table */
|
/* show the table */
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
|
@ -331,12 +331,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
||||||
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->offset);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Offset:"), 1.0, 1.0,
|
_("Offset:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (options->offset_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->offset);
|
||||||
|
|
||||||
/* the blend mode menu */
|
/* the blend mode menu */
|
||||||
options->blend_mode_w = gtk_option_menu_new ();
|
options->blend_mode_w = gtk_option_menu_new ();
|
||||||
|
@ -351,7 +351,7 @@ blend_options_new ()
|
||||||
menu = build_menu (gradient_option_items, NULL);
|
menu = build_menu (gradient_option_items, NULL);
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (options->gradient_type_w), menu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
gimp_table_attach_aligned (GTK_TABLE (table), 2,
|
||||||
_("Blend:"), 1.0, 0.5,
|
_("Gradient:"), 1.0, 0.5,
|
||||||
options->gradient_type_w, TRUE);
|
options->gradient_type_w, TRUE);
|
||||||
|
|
||||||
/* the repeat option */
|
/* the repeat option */
|
||||||
|
@ -405,12 +405,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_int_adjustment_update,
|
|
||||||
&options->max_depth);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Max Depth:"), 1.0, 1.0,
|
_("Max Depth:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->max_depth_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_int_adjustment_update,
|
||||||
|
&options->max_depth);
|
||||||
|
|
||||||
/* threshold scale */
|
/* threshold scale */
|
||||||
options->threshold_w =
|
options->threshold_w =
|
||||||
|
@ -418,12 +418,12 @@ blend_options_new ()
|
||||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
||||||
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
||||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||||
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
|
||||||
(GtkSignalFunc) tool_options_double_adjustment_update,
|
|
||||||
&options->threshold);
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Threshold:"), 1.0, 1.0,
|
_("Threshold:"), 1.0, 1.0,
|
||||||
scale, FALSE);
|
scale, FALSE);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(options->threshold_w), "value_changed",
|
||||||
|
(GtkSignalFunc) tool_options_double_adjustment_update,
|
||||||
|
&options->threshold);
|
||||||
|
|
||||||
/* show the table */
|
/* show the table */
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
|
@ -66,11 +66,43 @@ static void help_debug_cmd_callback (GtkWidget *widget,
|
||||||
|
|
||||||
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
static gchar G_GNUC_UNUSED *dummy_entries[] =
|
||||||
{
|
{
|
||||||
|
/* <Toolbox> */
|
||||||
|
N_("/Xtns/Animation"),
|
||||||
|
N_("/Xtns/Perl-Fu"),
|
||||||
|
N_("/Xtns/Perl-Fu/Logos"),
|
||||||
|
N_("/Xtns/Perl"),
|
||||||
|
N_("/Xtns/Render"),
|
||||||
|
N_("/Xtns/Render/Logos"),
|
||||||
|
N_("/Xtns/Render/Povray"),
|
||||||
|
N_("/Xtns/Script-Fu"),
|
||||||
|
N_("/Xtns/Script-Fu/Logos"),
|
||||||
|
N_("/Xtns/Script-Fu/Patterns"),
|
||||||
|
N_("/Xtns/Script-Fu/Web page themes"),
|
||||||
|
N_("/Xtns/Script-Fu/Utils"),
|
||||||
|
N_("/Xtns/Script-Fu/Buttons"),
|
||||||
|
N_("/Xtns/Script-Fu/Make Brush"),
|
||||||
|
N_("/Xtns/Script-Fu/Misc"),
|
||||||
|
N_("/Xtns/Script-Fu/Test"),
|
||||||
|
N_("/Xtns/Web Browser"),
|
||||||
|
|
||||||
|
/* <Image> */
|
||||||
|
N_("/Filters/Colors/Map"),
|
||||||
N_("/Filters/Render/Clouds"),
|
N_("/Filters/Render/Clouds"),
|
||||||
N_("/Filters/Render/Nature"),
|
N_("/Filters/Render/Nature"),
|
||||||
N_("/Filters/Render/Pattern"),
|
N_("/Filters/Render/Pattern"),
|
||||||
N_("/Filters/Colors/Map"),
|
N_("/Filters/Misc"),
|
||||||
N_("/Filters/Misc")
|
N_("/Script-Fu/Decor"),
|
||||||
|
N_("/Script-Fu/Modify"),
|
||||||
|
N_("/Script-Fu/Utils"),
|
||||||
|
N_("/Script-Fu/Animators"),
|
||||||
|
N_("/Script-Fu/Stencil Ops"),
|
||||||
|
N_("/Script-Fu/Alchemy"),
|
||||||
|
N_("/Script-Fu/Selection"),
|
||||||
|
N_("/Script-Fu/Shadow"),
|
||||||
|
N_("/Script-Fu/Render"),
|
||||||
|
N_("/Guides"),
|
||||||
|
N_("Video"),
|
||||||
|
N_("Video/Encode")
|
||||||
};
|
};
|
||||||
|
|
||||||
static GSList *last_opened_raw_filenames = NULL;
|
static GSList *last_opened_raw_filenames = NULL;
|
||||||
|
@ -993,8 +1025,18 @@ menus_reorder_plugins (void)
|
||||||
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
static gint n_image_file_entries = (sizeof (image_file_entries) /
|
||||||
sizeof (image_file_entries[0]));
|
sizeof (image_file_entries[0]));
|
||||||
|
|
||||||
GtkWidget *menu;
|
static gchar *reorder_submenus[] = { "<Image>/Video" };
|
||||||
|
static gint n_reorder_submenus = (sizeof (reorder_submenus) /
|
||||||
|
sizeof (reorder_submenus[0]));
|
||||||
|
|
||||||
|
static gchar *reorder_sub_submenus[] = { "<Image>/Filters",
|
||||||
|
"<Toolbox>/Xtns" };
|
||||||
|
static gint n_reorder_sub_submenus = (sizeof (reorder_sub_submenus) /
|
||||||
|
sizeof (reorder_sub_submenus[0]));
|
||||||
|
|
||||||
|
GtkItemFactory *item_factory;
|
||||||
GtkWidget *menu_item;
|
GtkWidget *menu_item;
|
||||||
|
GtkWidget *menu;
|
||||||
GList *list;
|
GList *list;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gint i, pos;
|
gint i, pos;
|
||||||
|
@ -1060,36 +1102,38 @@ menus_reorder_plugins (void)
|
||||||
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Image>/Filters menu... */
|
/* Reorder menus where plugins registered submenus */
|
||||||
menu_item = gtk_item_factory_get_widget (image_factory,
|
for (i = 0; i < n_reorder_submenus; i++)
|
||||||
"/Filters/Repeat last");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the <Toolbox>/Xtns menu... */
|
for (i = 0; i < n_reorder_sub_submenus; i++)
|
||||||
menu_item = gtk_item_factory_get_widget (toolbox_factory,
|
|
||||||
"/Xtns/Module Browser...");
|
|
||||||
if (!menu_item || !menu_item->parent)
|
|
||||||
return;
|
|
||||||
menu = menu_item->parent;
|
|
||||||
|
|
||||||
/* ...and reorder all submenus of it's submenus */
|
|
||||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
|
|
||||||
{
|
{
|
||||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (list->data);
|
item_factory = gtk_item_factory_from_path (reorder_sub_submenus[i]);
|
||||||
|
menu = gtk_item_factory_get_widget (item_factory,
|
||||||
|
reorder_sub_submenus[i]);
|
||||||
|
|
||||||
if (menu_item->submenu)
|
if (menu && GTK_IS_MENU (menu))
|
||||||
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
{
|
||||||
|
for (list = GTK_MENU_SHELL (menu)->children; list;
|
||||||
|
list = g_list_next (list))
|
||||||
|
{
|
||||||
|
GtkMenuItem *menu_item;
|
||||||
|
|
||||||
|
menu_item = GTK_MENU_ITEM (list->data);
|
||||||
|
|
||||||
|
if (menu_item->submenu)
|
||||||
|
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,32 +1662,34 @@ menus_init (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MENUPATH_SIZE 384
|
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
menu_translate (const gchar *path,
|
menu_translate (const gchar *path,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
static gchar menupath[MENUPATH_SIZE];
|
static gchar *menupath = NULL;
|
||||||
|
|
||||||
gchar *retval;
|
gchar *retval;
|
||||||
gchar *factory;
|
gchar *factory;
|
||||||
|
|
||||||
factory = (gchar *) data;
|
factory = (gchar *) data;
|
||||||
|
|
||||||
menupath[MENUPATH_SIZE - 1] = '\0';
|
if (menupath)
|
||||||
strncpy (menupath, path, MENUPATH_SIZE -1);
|
g_free (menupath);
|
||||||
|
|
||||||
|
menupath = g_strdup (path);
|
||||||
|
|
||||||
if ((strstr (path, "/tearoff1") != NULL) ||
|
if ((strstr (path, "/tearoff1") != NULL) ||
|
||||||
(strstr (path, "/---") != NULL) ||
|
(strstr (path, "/---") != NULL) ||
|
||||||
(strstr (path, "/MRU") != NULL))
|
(strstr (path, "/MRU") != NULL))
|
||||||
return menupath;
|
return menupath;
|
||||||
|
|
||||||
retval = gettext (path);
|
retval = gettext (menupath);
|
||||||
|
|
||||||
if (!strcmp (path, retval) && factory)
|
if (!strcmp (path, retval) && factory)
|
||||||
{
|
{
|
||||||
strcpy (menupath, factory);
|
g_free (menupath);
|
||||||
strncat (menupath, path, MENUPATH_SIZE - 1 - strlen (factory));
|
|
||||||
|
menupath = g_strconcat (factory, path, NULL);
|
||||||
|
|
||||||
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
retval = dgettext ("gimp-std-plugins", menupath) + strlen (factory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -576,7 +576,7 @@ query ()
|
||||||
"Wolfgang Hofer (hof@hotbot.com)",
|
"Wolfgang Hofer (hof@hotbot.com)",
|
||||||
"Wolfgang Hofer",
|
"Wolfgang Hofer",
|
||||||
gap_main_version,
|
gap_main_version,
|
||||||
N_("<Image>/Video/Encode/MPEG2 mpeg2encode...)"),
|
N_("<Image>/Video/Encode/MPEG2..."),
|
||||||
"RGB*, INDEXED*, GRAY*",
|
"RGB*, INDEXED*, GRAY*",
|
||||||
PROC_PLUG_IN,
|
PROC_PLUG_IN,
|
||||||
nargs_mpege, nreturn_vals,
|
nargs_mpege, nreturn_vals,
|
||||||
|
|
Loading…
Reference in New Issue