Commit f536a4ec authored by Hib Eris's avatar Hib Eris Committed by Carlos Garcia Campos

Do not use deprecated gtk_scrolled_window_add_with_viewport()

https://bugs.freedesktop.org/show_bug.cgi?id=64683
parent c10f2f87
......@@ -507,7 +507,11 @@ pgd_find_create_widget (PopplerDocument *document)
demo);
swindow = gtk_scrolled_window_new (NULL, NULL);
#if GTK_CHECK_VERSION(3, 7, 8)
gtk_container_add(GTK_CONTAINER(swindow), demo->darea);
#else
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow), demo->darea);
#endif
gtk_widget_show (demo->darea);
gtk_paned_add2 (GTK_PANED (hpaned), swindow);
......
......@@ -95,8 +95,12 @@ pgd_image_view_new ()
(gpointer)swindow);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#if GTK_CHECK_VERSION(3, 7, 8)
gtk_container_add(GTK_CONTAINER(swindow), darea);
#else
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow),
darea);
#endif
gtk_widget_show (darea);
return swindow;
......
......@@ -265,7 +265,11 @@ pgd_layers_create_viewer (PgdLayersDemo *demo)
swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#if GTK_CHECK_VERSION(3, 7, 8)
gtk_container_add(GTK_CONTAINER(swindow), demo->darea);
#else
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swindow), demo->darea);
#endif
gtk_widget_show (demo->darea);
gtk_box_pack_start (GTK_BOX (vbox), swindow, TRUE, TRUE, 0);
......
......@@ -427,8 +427,12 @@ pgd_render_create_widget (PopplerDocument *document)
demo->swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (demo->swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#if GTK_CHECK_VERSION(3, 7, 8)
gtk_container_add(GTK_CONTAINER(demo->swindow), demo->darea);
#else
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (demo->swindow),
demo->darea);
#endif
gtk_widget_show (demo->darea);
gtk_box_pack_start (GTK_BOX (vbox), demo->swindow, TRUE, TRUE, 0);
......
......@@ -671,8 +671,12 @@ pgd_selections_create_widget (PopplerDocument *document)
demo->swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (demo->swindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
#if GTK_CHECK_VERSION(3, 7, 8)
gtk_container_add(GTK_CONTAINER(demo->swindow), demo->darea);
#else
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (demo->swindow),
demo->darea);
#endif
gtk_widget_show (demo->darea);
gtk_box_pack_start (GTK_BOX (vbox), demo->swindow, TRUE, TRUE, 0);
......
......@@ -306,8 +306,12 @@ view_new (PopplerDocument *doc)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
#if GTK_CHECK_VERSION(3, 7, 8)
gtk_container_add(GTK_CONTAINER(sw), view->drawing_area);
#else
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw),
view->drawing_area);
#endif
gtk_widget_show (view->drawing_area);
gtk_box_pack_end (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment