Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit5a95d17490a7acbb41ce797e0fc294be259b5d5a (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-03-12 05:48:11 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-03-12 06:15:31 +0100
Files6a6f85507795b515cb4b665f4edbee29ae34be7e
goodwolf-5a95d17490a7acbb41ce797e0fc294be259b5d5a.tar
goodwolf-5a95d17490a7acbb41ce797e0fc294be259b5d5a.tar.gz
goodwolf-5a95d17490a7acbb41ce797e0fc294be259b5d5a.zip
Parentc55a5d9413ccbe4c861d6d9256366ef31b7fa9d8 (diff)
badwolf.c: Use position property
Thanks to Chris for the help: https://social.libre.fi/objects/2a8d7707-97ca-4139-84e5-025a3502662b
1 files changed, 4 insertions, 5 deletions
-rw-r--r--badwolf.c9
diff --git a/badwolf.c b/badwolf.c
index 58f3962..d4accfe 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -433,13 +433,12 @@ void closeCb_clicked(GtkButton *close, gpointer user_data)
(void)close;
struct Client *browser = (struct Client *)user_data;
GtkNotebook *notebook = GTK_NOTEBOOK(browser->window->notebook);
- GValue *position;
+ GValue position = G_VALUE_INIT;
+ g_value_init (&position, G_TYPE_INT);
- gtk_container_child_get_property(GTK_CONTAINER(notebook), browser->box, "position", position);
+ gtk_container_child_get_property(GTK_CONTAINER(notebook), browser->box, "position", &position);
- gint *page_pos = (gint *)g_value_peek_pointer(position);
-
- gtk_notebook_remove_page(notebook, *page_pos);
+ gtk_notebook_remove_page(notebook, g_value_get_int(&position));
free(browser);
}