mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
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:
parent
c9cda15e70
commit
cf7888fdaf
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user