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/search-bar.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/search-bar.c')
-rw-r--r-- | libslab/search-bar.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libslab/search-bar.c b/libslab/search-bar.c index 750ace36..ec689311 100644 --- a/libslab/search-bar.c +++ b/libslab/search-bar.c @@ -57,7 +57,7 @@ enum static guint signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (NldSearchBar, nld_search_bar, GTK_TYPE_VBOX) +G_DEFINE_TYPE (NldSearchBar, nld_search_bar, GTK_TYPE_BOX) static void emit_search (NldSearchBar * search_bar); static void emit_search_callback (GtkWidget * widget, gpointer search_bar); @@ -88,8 +88,13 @@ nld_search_bar_init (NldSearchBar * search_bar) GtkWidget *entry; gtk_widget_set_can_focus (GTK_WIDGET (search_bar), TRUE); + gtk_orientable_set_orientation (GTK_ORIENTABLE (search_bar), GTK_ORIENTATION_VERTICAL); +#if GTK_CHECK_VERSION (3, 0, 0) + priv->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); +#else priv->hbox = gtk_hbox_new (FALSE, 3); +#endif gtk_box_pack_start (GTK_BOX (search_bar), priv->hbox, TRUE, FALSE, 0); alignment = gtk_alignment_new (0.0, 0.5, 1.0, 0.0); |