[gtk/wip/matthiasc/popup2: 51/51] Attach the popup to the entry
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup2: 51/51] Attach the popup to the entry
- Date: Mon, 18 Mar 2019 12:49:28 +0000 (UTC)
commit 2f24e0fb7ebb0e37afccc52a5f9628fc7bb7b85d
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 18 08:36:41 2019 -0400
Attach the popup to the entry
A box is not prepared for out-of-root children.
tests/testpopup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tests/testpopup.c b/tests/testpopup.c
index 0bbe6c1a04..421f9aed53 100644
--- a/tests/testpopup.c
+++ b/tests/testpopup.c
@@ -31,7 +31,7 @@ add_content (GtkWidget *parent)
gtk_widget_grab_default (button);
- return box;
+ return entry;
}
static GtkWidget *
@@ -60,6 +60,7 @@ int
main (int argc, char *argv[])
{
GtkWidget *window;
+ GtkWidget *entry;
GtkWidget *box;
GtkWidget *popup;
GtkWidget *button;
@@ -69,9 +70,10 @@ main (int argc, char *argv[])
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
- box = add_content (window);
+ entry = add_content (window);
+ box = gtk_widget_get_parent (entry);
- popup = create_popup (box);
+ popup = create_popup (entry);
button = gtk_toggle_button_new_with_mnemonic ("_Popup");
g_signal_connect (button, "toggled", G_CALLBACK (toggle_popup), popup);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]