There is only GtkBox, neither GtkHBox nor GtkVBox.
Constructors and defaults have changed, we need
to set "orientation" for vertical boxes.
The panel takes care of its pages, and the view
of itself.
gtk_container_add on GtkBox is different to GtkVBox
so we must use gtk_box_pack_start.
GtkScrollable exists as a proper interface now.
#define GTK_TYPE_VBOX GTK_TYPE_BOX
#define GtkVBox GtkBox
#define GtkVBoxClass GtkBoxClass
+ #define gtk_vbox_new(hmg,spc) g_object_new (GTK_TYPE_BOX, \
+ "homogeneous", hmg, "spacing", spc, \
+ "orientation", GTK_ORIENTATION_VERTICAL, NULL)
#define GTK_TYPE_HBOX GTK_TYPE_BOX
#define GtkHBox GtkBox
#define GtkHBoxClass GtkBoxClass
+ #define gtk_hbox_new(hmg,spc) g_object_new (GTK_TYPE_BOX, \
+ "homogeneous", hmg, "spacing", spc, \
+ "orientation", GTK_ORIENTATION_HORIZONTAL, NULL)
#endif
#if !GLIB_CHECK_VERSION (2, 32, 0)
MidoriViewable* viewable)
{
GtkWidget* scrolled;
+ #if !GTK_CHECK_VERSION (3, 0, 0)
GObjectClass* gobject_class;
+ #endif
GtkWidget* widget;
GtkWidget* toolbar;
GtkToolItem* toolitem;
g_return_val_if_fail (MIDORI_IS_PANEL (panel), -1);
g_return_val_if_fail (MIDORI_IS_VIEWABLE (viewable), -1);
+ #if GTK_CHECK_VERSION (3, 2, 0)
+ if (GTK_IS_ORIENTABLE (viewable))
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (viewable),
+ GTK_ORIENTATION_VERTICAL);
+ #endif
+
if (GTK_IS_SCROLLED_WINDOW (viewable))
scrolled = (GtkWidget*)viewable;
else
GTK_POLICY_AUTOMATIC);
gtk_widget_set_can_focus (scrolled, TRUE);
gtk_widget_show (scrolled);
+ #if GTK_CHECK_VERSION (3, 0, 0)
+ if (GTK_IS_SCROLLABLE (viewable))
+ #else
gobject_class = G_OBJECT_GET_CLASS (viewable);
-#if !GTK_CHECK_VERSION(3,0,0) /* TODO */
if (GTK_WIDGET_CLASS (gobject_class)->set_scroll_adjustments_signal)
+ #endif
widget = (GtkWidget*)viewable;
else
-#endif
{
widget = gtk_viewport_new (NULL, NULL);
gtk_widget_show (widget);
view->scrollh = view->scrollv = -2;
view->back_forward_set = FALSE;
+ #if GTK_CHECK_VERSION (3, 2, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (view), GTK_ORIENTATION_VERTICAL);
+ #endif
+
view->web_view = NULL;
/* Adjustments are not created initially, but overwritten later */
view->scrolled_window = katze_scrolled_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (view->scrolled_window),
GTK_SHADOW_NONE);
- gtk_container_add (GTK_CONTAINER (view), view->scrolled_window);
+ gtk_box_pack_start (GTK_BOX (view), view->scrolled_window, TRUE, TRUE, 0);
g_signal_connect (view->item, "meta-data-changed",
G_CALLBACK (midori_view_item_meta_data_changed), view);