[gtk/kill-tree-menu: 20/52] accellabel: Remove an example using menus



commit d6eacd81a3c12e3a4c0b1b6a76231bd29ee78768
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 26 22:08:05 2019 -0500

    accellabel: Remove an example using menus

 gtk/gtkaccellabel.c | 24 ------------------------
 1 file changed, 24 deletions(-)
---
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index 0906d7e76f..3cd5f81495 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -72,30 +72,6 @@
  * set (see #GtkAccelFlags).
  * A #GtkAccelLabel can display multiple accelerators and even signal names,
  * though it is almost always used to display just one accelerator key.
- *
- * ## Creating a simple menu item with an accelerator key.
- *
- * |[<!-- language="C" -->
- *   GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- *   GtkWidget *menu = gtk_menu_new ();
- *   GtkWidget *save_item;
- *   GtkAccelGroup *accel_group;
- *
- *   // Create a GtkAccelGroup and add it to the window.
- *   accel_group = gtk_accel_group_new ();
- *   gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
- *
- *   // Create the menu item using the convenience function.
- *   save_item = gtk_menu_item_new_with_label ("Save");
- *   gtk_container_add (GTK_CONTAINER (menu), save_item);
- *
- *   // Now add the accelerator to the GtkMenuItem. Note that since we
- *   // called gtk_menu_item_new_with_label() to create the GtkMenuItem
- *   // the GtkAccelLabel is automatically set up to display the
- *   // GtkMenuItem accelerators. We just need to make sure we use
- *   // GTK_ACCEL_VISIBLE here.
- *   gtk_widget_add_accelerator (save_item, "activate", accel_group,
- *                               GDK_KEY_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
  * ]|
  *
  * # CSS nodes


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