From d03daa940e87400b53bee9c065bac9dd0b1bbf41 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Tue, 28 Jun 2016 13:34:51 +0200 Subject: GTK+-3 searchbar: use widget properties instead of GtkAlignment --- src/caja-search-bar.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/caja-search-bar.c b/src/caja-search-bar.c index f090e556..bbe1be02 100644 --- a/src/caja-search-bar.c +++ b/src/caja-search-bar.c @@ -154,7 +154,9 @@ focus_in_event_callback (GtkWidget *widget, static void caja_search_bar_init (CajaSearchBar *bar) { +#if !GTK_CHECK_VERSION(3, 0, 0) GtkWidget *alignment; +#endif GtkWidget *hbox; GtkWidget *label; #if GTK_CHECK_VERSION(3, 0, 0) @@ -168,6 +170,14 @@ caja_search_bar_init (CajaSearchBar *bar) gtk_event_box_set_visible_window (GTK_EVENT_BOX (bar), FALSE); +#if GTK_CHECK_VERSION(3, 0, 0) + hbox = gtk_hbox_new (FALSE, 6); + gtk_widget_set_margin_start (hbox, 6); + gtk_widget_set_margin_end (hbox, 6); + gtk_widget_show (hbox); + gtk_container_add (GTK_CONTAINER (bar), hbox); + +#else alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), @@ -178,6 +188,7 @@ caja_search_bar_init (CajaSearchBar *bar) hbox = gtk_hbox_new (FALSE, 6); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (alignment), hbox); +#endif label = gtk_label_new (_("Search:")); gtk_widget_show (label); -- cgit v1.2.1