[gtk/gbsneto/shortcuts-rebased: 105/112] doc tools: Create AccelLabel image without using GtkAccelGroup
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gbsneto/shortcuts-rebased: 105/112] doc tools: Create AccelLabel image without using GtkAccelGroup
- Date: Thu, 16 May 2019 00:15:10 +0000 (UTC)
commit 136d6a1ae889c8d4ee917c088a6af1cac92b0cf4
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 | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index f044c6c998..a9f65558a7 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -281,7 +281,6 @@ create_accel_label (void)
{
WidgetInfo *info;
GtkWidget *widget, *button, *box;
- GtkAccelGroup *accel_group;
widget = gtk_accel_label_new ("Accel Label");
@@ -293,14 +292,10 @@ create_accel_label (void)
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]