[gtk/wip/matthiasc/shortcut-2: 40/88] doc tools: Create AccelLabel image without using GtkAccelGroup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/shortcut-2: 40/88] doc tools: Create AccelLabel image without using GtkAccelGroup
- Date: Tue, 24 Mar 2020 04:18:45 +0000 (UTC)
commit a1efa03163ceb70c9dd7dfb3d8d6b28bfc1a6fa9
Author: Benjamin Otte <otte redhat com>
Date: Fri Aug 24 07:38:44 2018 +0200
doc tools: Create AccelLabel image without using GtkAccelGroup
docs/tools/widgets.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index fba3e02a0a..7b63677368 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -281,26 +281,20 @@ create_accel_label (void)
{
WidgetInfo *info;
GtkWidget *widget, *button, *box;
- GtkAccelGroup *accel_group;
widget = gtk_accel_label_new ("Accel Label");
button = gtk_button_new_with_label ("Quit");
- gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (widget), button);
gtk_widget_hide (button);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (box), widget);
gtk_container_add (GTK_CONTAINER (box), button);
- gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (widget), button);
- accel_group = gtk_accel_group_new();
+ gtk_accel_label_set_accel (GTK_ACCEL_LABEL (widget), GDK_KEY_Q, GDK_CONTROL_MASK);
info = new_widget_info ("accel-label", box, SMALL);
- gtk_widget_add_accelerator (button, "activate", accel_group, GDK_KEY_Q, GDK_CONTROL_MASK,
- GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
-
return info;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]