Commit cf7888fd authored by CST 1999 Shawn T. Amundson's avatar CST 1999 Shawn T. Amundson Committed by Shawn Amundson

New function gtk_menu_reorder_child() from Tim Janik.

Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>

	* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
	  from Tim Janik.

This will be used in GIMP, so it is tested there.
parent c9cda15e
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
Thu Feb 25 02:13:20 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkmenu.[ch]: New function gtk_menu_reorder_child()
from Tim Janik.
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
......
......@@ -669,6 +669,24 @@ gtk_menu_set_title (GtkMenu *menu,
g_strdup (title), (GtkDestroyNotify) g_free);
}
void
gtk_menu_reorder_child (GtkMenu *menu,
GtkWidget *child,
gint position)
{
GtkMenuShell *menu_shell;
g_return_if_fail (GTK_IS_MENU (menu));
g_return_if_fail (GTK_IS_MENU_ITEM (child));
menu_shell = GTK_MENU_SHELL (menu);
if (g_list_find (menu_shell->children, child))
{
menu_shell->children = g_list_remove (menu_shell->children, child);
menu_shell->children = g_list_insert (menu_shell->children, child, position);
if (GTK_WIDGET_VISIBLE (menu_shell))
gtk_widget_queue_resize (GTK_WIDGET (menu_shell));
}
}
static void
gtk_menu_realize (GtkWidget *widget)
{
......
......@@ -145,6 +145,10 @@ void gtk_menu_set_tearoff_state (GtkMenu *menu,
void gtk_menu_set_title (GtkMenu *menu,
const gchar *title);
void gtk_menu_reorder_child (GtkMenu *menu,
GtkWidget *child,
gint position);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
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