[gtk+/gtk-2-90] Remove deprecated GtkMenu stuff.



commit 2a3d83f5ba9fd5ea6c12a998dae5dd5577ae9263
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Nov 24 17:33:48 2009 +0100

    Remove deprecated GtkMenu stuff.
    
    Also, substitute the deprecated functions with the new ones in
    documentation.

 docs/refcounting.txt                 |    2 +-
 docs/reference/gtk/gtk-sections.txt  |    3 ---
 docs/reference/gtk/tmpl/gtkmenu.sgml |   33 ---------------------------------
 docs/tutorial/gtk_tut.sgml           |   34 +++++++++++++++++-----------------
 gtk/gtkmenu.h                        |    6 ------
 5 files changed, 18 insertions(+), 60 deletions(-)
---
diff --git a/docs/refcounting.txt b/docs/refcounting.txt
index 5ebf818..8069400 100644
--- a/docs/refcounting.txt
+++ b/docs/refcounting.txt
@@ -197,7 +197,7 @@ GtkOptionMenu looks like this:
   /* menu_item->ref_count == 1 and it is flagged as `floating'.
    */
 
-  gtk_menu_append (GTK_MENU (menu), menu_item);
+  gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
   /* menu_item->ref_count still == 1, but it is no longer `floating'.
    */
   
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index febbbf2..2e62f31 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -2359,9 +2359,6 @@ gtk_list_item_get_type
 GtkMenu
 gtk_menu_new
 gtk_menu_set_screen
-gtk_menu_append
-gtk_menu_prepend
-gtk_menu_insert
 gtk_menu_reorder_child
 gtk_menu_attach
 gtk_menu_popup
diff --git a/docs/reference/gtk/tmpl/gtkmenu.sgml b/docs/reference/gtk/tmpl/gtkmenu.sgml
index c8d8376..fc4b42e 100644
--- a/docs/reference/gtk/tmpl/gtkmenu.sgml
+++ b/docs/reference/gtk/tmpl/gtkmenu.sgml
@@ -206,39 +206,6 @@ Creates a new #GtkMenu.
 @screen: 
 
 
-<!-- ##### MACRO gtk_menu_append ##### -->
-<para>
-Adds a new #GtkMenuItem to the end of the menu's item list.
-</para>
-
- menu: a #GtkMenu.
- child: The #GtkMenuItem to add.
- Deprecated: Use gtk_menu_shell_append() instead.
-
-
-<!-- ##### MACRO gtk_menu_prepend ##### -->
-<para>
-Adds a new #GtkMenuItem to the beginning of the menu's item list.
-</para>
-
- menu: a #GtkMenu.
- child: The #GtkMenuItem to add.
- Deprecated: Use gtk_menu_shell_prepend() instead.
-
-
-<!-- ##### MACRO gtk_menu_insert ##### -->
-<para>
-Adds a new #GtkMenuItem to the menu's item list at the position
-indicated by @position. 
-</para>
-
- menu: a #GtkMenu.
- child: The #GtkMenuItem to add.
- pos: The position in the item list where @child is added.
-      Positions are numbered from 0 to n-1.
- Deprecated: Use gtk_menu_shell_insert() instead.
-
-
 <!-- ##### FUNCTION gtk_menu_reorder_child ##### -->
 <para>
 Moves a #GtkMenuItem to a new position within the #GtkMenu.
diff --git a/docs/tutorial/gtk_tut.sgml b/docs/tutorial/gtk_tut.sgml
index 4dd3c51..5363b46 100644
--- a/docs/tutorial/gtk_tut.sgml
+++ b/docs/tutorial/gtk_tut.sgml
@@ -2956,19 +2956,19 @@ void create_range_controls( void )
     item = make_menu_item ("Top",
                            GTK_SIGNAL_FUNC(cb_pos_menu_select),
                            GINT_TO_POINTER (GTK_POS_TOP));
-    gtk_menu_append (GTK_MENU (menu), item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     item = make_menu_item ("Bottom", GTK_SIGNAL_FUNC (cb_pos_menu_select), 
                            GINT_TO_POINTER (GTK_POS_BOTTOM));
-    gtk_menu_append (GTK_MENU (menu), item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     item = make_menu_item ("Left", GTK_SIGNAL_FUNC (cb_pos_menu_select),
                            GINT_TO_POINTER (GTK_POS_LEFT));
-    gtk_menu_append (GTK_MENU (menu), item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     item = make_menu_item ("Right", GTK_SIGNAL_FUNC (cb_pos_menu_select),
-                            GINT_TO_POINTER (GTK_POS_RIGHT));
-    gtk_menu_append (GTK_MENU (menu), item);
+                           GINT_TO_POINTER (GTK_POS_RIGHT));
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu);
     gtk_box_pack_start (GTK_BOX (box2), opt, TRUE, TRUE, 0);
@@ -2992,17 +2992,17 @@ void create_range_controls( void )
     item = make_menu_item ("Continuous",
                            GTK_SIGNAL_FUNC (cb_update_menu_select),
                            GINT_TO_POINTER (GTK_UPDATE_CONTINUOUS));
-    gtk_menu_append (GTK_MENU (menu), item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     item = make_menu_item ("Discontinuous",
-                            GTK_SIGNAL_FUNC (cb_update_menu_select),
-                            GINT_TO_POINTER (GTK_UPDATE_DISCONTINUOUS));
-    gtk_menu_append (GTK_MENU (menu), item);
+                           GTK_SIGNAL_FUNC (cb_update_menu_select),
+                           GINT_TO_POINTER (GTK_UPDATE_DISCONTINUOUS));
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     item = make_menu_item ("Delayed",
                            GTK_SIGNAL_FUNC (cb_update_menu_select),
                            GINT_TO_POINTER (GTK_UPDATE_DELAYED));
-    gtk_menu_append (GTK_MENU (menu), item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   
     gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu);
     gtk_box_pack_start (GTK_BOX (box2), opt, TRUE, TRUE, 0);
@@ -9989,7 +9989,7 @@ item with a label already packed into it, and the other just creates a
 blank menu item.
 
 Once you've created a menu item you have to put it into a menu. This
-is done using the function gtk_menu_append. In order to capture when
+is done using the function gtk_menu_shell_append. In order to capture when
 the item is selected by the user, we need to connect to the
 <tt/activate/ signal in the usual way. So, if we wanted to create a
 standard <tt/File/ menu, with the options <tt/Open/, <tt/Save/, and
@@ -10004,9 +10004,9 @@ standard <tt/File/ menu, with the options <tt/Open/, <tt/Save/, and
     quit_item = gtk_menu_item_new_with_label ("Quit");
 
     /* Add them to the menu */
-    gtk_menu_append (GTK_MENU (file_menu), open_item);
-    gtk_menu_append (GTK_MENU (file_menu), save_item);
-    gtk_menu_append (GTK_MENU (file_menu), quit_item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), open_item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), save_item);
+    gtk_menu_shell_append (GTK_MENU_SHELL (file_menu), quit_item);
 
     /* Attach the callback functions to the activate signal */
     gtk_signal_connect_object (GTK_OBJECT (open_items), "activate",
@@ -10083,7 +10083,7 @@ attached:
 <itemize>
 <item> Create a new menu using gtk_menu_new()
 <item> Use multiple calls to gtk_menu_item_new() for each item you
-wish to have on your menu. And use gtk_menu_append() to put each of
+wish to have on your menu. And use gtk_menu_shell_append() to put each of
 these new items on to the menu.
 <item> Create a menu item using gtk_menu_item_new(). This will be the
 root of the menu, the text appearing here will be on the menubar
@@ -10167,7 +10167,7 @@ int main( int   argc,
     menu = gtk_menu_new ();
 
     /* Next we make a little loop that makes three menu-entries for "test-menu".
-     * Notice the call to gtk_menu_append.  Here we are adding a list of
+     * Notice the call to gtk_menu_shell_append.  Here we are adding a list of
      * menu items to our menu.  Normally, we'd also catch the "clicked"
      * signal on each of the menu items and setup a callback for it,
      * but it's omitted here to save space. */
@@ -10181,7 +10181,7 @@ int main( int   argc,
             menu_items = gtk_menu_item_new_with_label (buf);
 
             /* ...and add it to the menu. */
-            gtk_menu_append (GTK_MENU (menu), menu_items);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
 
 	    /* Do something interesting when the menuitem is selected */
 	    gtk_signal_connect_object (GTK_OBJECT (menu_items), "activate",
diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h
index 8a59ae0..6a944c0 100644
--- a/gtk/gtkmenu.h
+++ b/gtk/gtkmenu.h
@@ -203,12 +203,6 @@ void       gtk_menu_set_monitor           (GtkMenu             *menu,
 gint       gtk_menu_get_monitor           (GtkMenu             *menu);
 GList*     gtk_menu_get_for_attach_widget (GtkWidget           *widget); 
 
-#ifndef GTK_DISABLE_DEPRECATED
-#define gtk_menu_append(menu,child)	gtk_menu_shell_append  ((GtkMenuShell *)(menu),(child))
-#define gtk_menu_prepend(menu,child)    gtk_menu_shell_prepend ((GtkMenuShell *)(menu),(child))
-#define gtk_menu_insert(menu,child,pos)	gtk_menu_shell_insert ((GtkMenuShell *)(menu),(child),(pos))
-#endif /* GTK_DISABLE_DEPRECATED */
-
 void     gtk_menu_set_reserve_toggle_size (GtkMenu  *menu,
                                           gboolean   reserve_toggle_size);
 gboolean gtk_menu_get_reserve_toggle_size (GtkMenu  *menu);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]