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.
This commit is contained in:
CST 1999 Shawn T. Amundson 1999-02-25 08:17:13 +00:00 committed by Shawn Amundson
parent c9cda15e70
commit cf7888fdaf
9 changed files with 57 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -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)
{

View File

@ -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 */