summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/caja-search-bar.c11
1 files changed, 11 insertions, 0 deletions
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);