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-context-picker.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-context-picker.c')
-rw-r--r-- | libslab/search-context-picker.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libslab/search-context-picker.c b/libslab/search-context-picker.c index fbd0b560..d1aca98e 100644 --- a/libslab/search-context-picker.c +++ b/libslab/search-context-picker.c @@ -67,24 +67,28 @@ static void nld_search_context_picker_init (NldSearchContextPicker * picker) { NldSearchContextPickerPrivate *priv = NLD_SEARCH_CONTEXT_PICKER_GET_PRIVATE (picker); - GtkBox *hbox; + GtkWidget *hbox; GtkWidget *separator; - hbox = GTK_BOX (gtk_hbox_new (FALSE, 10)); - gtk_container_add (GTK_CONTAINER (picker), GTK_WIDGET (hbox)); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10); +#else + hbox = gtk_hbox_new (FALSE, 10); +#endif + gtk_container_add (GTK_CONTAINER (picker), hbox); priv->cur_icon = GTK_IMAGE (gtk_image_new ()); - gtk_box_pack_start (hbox, GTK_WIDGET (priv->cur_icon), FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (priv->cur_icon), FALSE, FALSE, 0); #if GTK_CHECK_VERSION (3, 0, 0) separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); #else separator = gtk_vseparator_new (); #endif - gtk_box_pack_start (hbox, separator, FALSE, FALSE, 0); - gtk_box_pack_start (hbox, gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE), FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), separator, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE), FALSE, FALSE, 0); - gtk_widget_show_all (GTK_WIDGET (hbox)); + gtk_widget_show_all (hbox); priv->cur_context = -1; |