aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-27 14:31:12 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-28 11:22:24 (GMT)
commit774bb27f8d216e22681ce754f264b0cd00a60095 (patch)
treed4ed0c7da9475fa3a2f6aafd614ae9ddb24d569a
parent7db851dbcb2fe03cbd9103dc29367fb2986b157c (diff)
Use gtk_container_add() instead of gtk_menu_append()
gtk_menu_append() is deprecated and not available anymore with Gtk 3. gtk_container_add() works with both versions, so use it instead. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--src/camorama-window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 128bfc7..b485d35 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -286,7 +286,7 @@ load_interface(cam* cam) {
sprintf(name, "%dx%d", cam->res[i].x, cam->res[i].y);
new_res = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(small_res), name);
- gtk_menu_append(GTK_MENU(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))), new_res);
+ gtk_container_add(GTK_CONTAINER(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))), new_res);
gtk_widget_show (new_res);
g_signal_connect(new_res, "activate",
G_CALLBACK (on_change_size_activate), cam);
@@ -305,14 +305,14 @@ load_interface(cam* cam) {
G_CALLBACK (on_change_size_activate), cam);
new_res = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(small_res), "Medium");
- gtk_menu_append(GTK_MENU(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))), new_res);
+ gtk_container_add(GTK_CONTAINER(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))), new_res);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (new_res), FALSE);
gtk_widget_show (new_res);
g_signal_connect(new_res, "activate", G_CALLBACK (on_change_size_activate), cam);
gtk_widget_set_name(new_res, "medium");
new_res = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(small_res), "Large");
- gtk_menu_append(GTK_MENU(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))), new_res);
+ gtk_container_add(GTK_CONTAINER(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))), new_res);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (new_res), FALSE);
gtk_widget_show (new_res);
g_signal_connect(new_res, "activate", G_CALLBACK (on_change_size_activate), cam);

Privacy Policy