diff options
author | monsta <[email protected]> | 2016-01-15 13:54:23 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-15 16:46:34 +0300 |
commit | f0450bb4001a9d37025578b7933b552cb07b27f6 (patch) | |
tree | b17ea5acdb50fcb1629375dcc6185b1e5b5fb2b2 /libslab/slab-section.c | |
parent | c04a7d200ae5719ee1ce78aab692007b37003b0b (diff) | |
download | mate-control-center-f0450bb4001a9d37025578b7933b552cb07b27f6.tar.bz2 mate-control-center-f0450bb4001a9d37025578b7933b552cb07b27f6.tar.xz |
libslab: use GtkBox instead of GtkVBox in both GTK+ builds
and fix deprecated usage of GtkHBox and GtkVBox in GTK+3 build
NOTE: this commit changes the public interface of libslab in both GTK+ builds
(due to transition of classes' parents and/or members from GtkVBox to GtkBox)
Diffstat (limited to 'libslab/slab-section.c')
-rw-r--r-- | libslab/slab-section.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libslab/slab-section.c b/libslab/slab-section.c index c03f0c94..d7dd978c 100644 --- a/libslab/slab-section.c +++ b/libslab/slab-section.c @@ -20,7 +20,7 @@ #include "slab-section.h" -G_DEFINE_TYPE (SlabSection, slab_section, GTK_TYPE_VBOX) +G_DEFINE_TYPE (SlabSection, slab_section, GTK_TYPE_BOX) static void slab_section_finalize (GObject *); @@ -123,6 +123,7 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style) gchar * widget_theming_name; section = g_object_new (SLAB_SECTION_TYPE, NULL); + gtk_orientable_set_orientation (GTK_ORIENTABLE (section), GTK_ORIENTATION_VERTICAL); gtk_box_set_homogeneous (GTK_BOX (section), FALSE); gtk_box_set_spacing (GTK_BOX (section), 0); section->style = style; @@ -145,7 +146,11 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style) } gtk_box_pack_start (GTK_BOX (section), align, TRUE, TRUE, 0); +#if GTK_CHECK_VERSION (3, 0, 0) + section->childbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 10)); +#else section->childbox = GTK_BOX (gtk_vbox_new (FALSE, 10)); +#endif gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (section->childbox)); section->title = gtk_label_new (title_markup); |