put the change from Monday back in that I accidentially reverted yesterday

--Sven
This commit is contained in:
Sven Neumann 1999-11-23 21:02:54 +00:00
parent a38de26ce6
commit 66f212c116
5 changed files with 145 additions and 8 deletions

View File

@ -1,3 +1,8 @@
Tue Nov 23 22:00:12 MET 1999 Sven Neumann <sven@gimp.org>
* app/menus.c: Looks like I managed to accidentially revert my
change from Mon Nov 22. Put it back in.
Tue Nov 23 21:22:01 MET 1999 Sven Neumann <sven@gimp.org>
* plug-ins/AlienMap/AlienMap.c

View File

@ -933,9 +933,16 @@ menus_reorder_plugins (void)
static gint n_xtns_plugins = (sizeof (xtns_plugins) /
sizeof (xtns_plugins[0]));
static gchar *rotate_plugins[] = { "90 degrees",
"180 degrees",
"270 degrees" };
static gint n_rotate_plugins = (sizeof (rotate_plugins) /
sizeof (rotate_plugins[0]));
GtkWidget *menu;
GtkWidget *menu_item;
GList *list;
gchar *path;
gint i, pos;
/* Beautify <Toolbox>/Xtns */
@ -972,6 +979,32 @@ menus_reorder_plugins (void)
if (menu_item->submenu)
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
}
/* Reorder Rotate plugin menu entries */
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Image/Transforms/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Layers/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
}
static void
@ -1545,7 +1578,7 @@ tearoff_cmd_callback (GtkWidget *widget,
/* This should be a window */
if (!GTK_IS_WINDOW (top))
{
g_message(_("tearoff menu not in top level window"));
g_message("tearoff menu not in top level window");
}
else
{
@ -1568,7 +1601,7 @@ tearoff_cmd_callback (GtkWidget *widget,
if (!top)
{
g_message (_("can't unregister tearoff menu top level window"));
g_message ("can't unregister tearoff menu top level window");
}
else
{

View File

@ -933,9 +933,16 @@ menus_reorder_plugins (void)
static gint n_xtns_plugins = (sizeof (xtns_plugins) /
sizeof (xtns_plugins[0]));
static gchar *rotate_plugins[] = { "90 degrees",
"180 degrees",
"270 degrees" };
static gint n_rotate_plugins = (sizeof (rotate_plugins) /
sizeof (rotate_plugins[0]));
GtkWidget *menu;
GtkWidget *menu_item;
GList *list;
gchar *path;
gint i, pos;
/* Beautify <Toolbox>/Xtns */
@ -972,6 +979,32 @@ menus_reorder_plugins (void)
if (menu_item->submenu)
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
}
/* Reorder Rotate plugin menu entries */
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Image/Transforms/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Layers/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
}
static void
@ -1545,7 +1578,7 @@ tearoff_cmd_callback (GtkWidget *widget,
/* This should be a window */
if (!GTK_IS_WINDOW (top))
{
g_message(_("tearoff menu not in top level window"));
g_message("tearoff menu not in top level window");
}
else
{
@ -1568,7 +1601,7 @@ tearoff_cmd_callback (GtkWidget *widget,
if (!top)
{
g_message (_("can't unregister tearoff menu top level window"));
g_message ("can't unregister tearoff menu top level window");
}
else
{

View File

@ -933,9 +933,16 @@ menus_reorder_plugins (void)
static gint n_xtns_plugins = (sizeof (xtns_plugins) /
sizeof (xtns_plugins[0]));
static gchar *rotate_plugins[] = { "90 degrees",
"180 degrees",
"270 degrees" };
static gint n_rotate_plugins = (sizeof (rotate_plugins) /
sizeof (rotate_plugins[0]));
GtkWidget *menu;
GtkWidget *menu_item;
GList *list;
gchar *path;
gint i, pos;
/* Beautify <Toolbox>/Xtns */
@ -972,6 +979,32 @@ menus_reorder_plugins (void)
if (menu_item->submenu)
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
}
/* Reorder Rotate plugin menu entries */
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Image/Transforms/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Layers/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
}
static void
@ -1545,7 +1578,7 @@ tearoff_cmd_callback (GtkWidget *widget,
/* This should be a window */
if (!GTK_IS_WINDOW (top))
{
g_message(_("tearoff menu not in top level window"));
g_message("tearoff menu not in top level window");
}
else
{
@ -1568,7 +1601,7 @@ tearoff_cmd_callback (GtkWidget *widget,
if (!top)
{
g_message (_("can't unregister tearoff menu top level window"));
g_message ("can't unregister tearoff menu top level window");
}
else
{

View File

@ -933,9 +933,16 @@ menus_reorder_plugins (void)
static gint n_xtns_plugins = (sizeof (xtns_plugins) /
sizeof (xtns_plugins[0]));
static gchar *rotate_plugins[] = { "90 degrees",
"180 degrees",
"270 degrees" };
static gint n_rotate_plugins = (sizeof (rotate_plugins) /
sizeof (rotate_plugins[0]));
GtkWidget *menu;
GtkWidget *menu_item;
GList *list;
gchar *path;
gint i, pos;
/* Beautify <Toolbox>/Xtns */
@ -972,6 +979,32 @@ menus_reorder_plugins (void)
if (menu_item->submenu)
menus_filters_subdirs_to_top (GTK_MENU (menu_item->submenu));
}
/* Reorder Rotate plugin menu entries */
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Image/Transforms/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
pos = 2;
for (i = 0; i < n_rotate_plugins; i++)
{
path = g_strconcat ("/Layers/Rotate/", rotate_plugins[i], NULL);
menu_item = gtk_item_factory_get_widget (image_factory, path);
if (menu_item && menu_item->parent)
{
gtk_menu_reorder_child (GTK_MENU (menu_item->parent), menu_item, pos);
pos++;
}
g_free (path);
}
}
static void
@ -1545,7 +1578,7 @@ tearoff_cmd_callback (GtkWidget *widget,
/* This should be a window */
if (!GTK_IS_WINDOW (top))
{
g_message(_("tearoff menu not in top level window"));
g_message("tearoff menu not in top level window");
}
else
{
@ -1568,7 +1601,7 @@ tearoff_cmd_callback (GtkWidget *widget,
if (!top)
{
g_message (_("can't unregister tearoff menu top level window"));
g_message ("can't unregister tearoff menu top level window");
}
else
{