summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-28 13:34:51 +0200
committerraveit65 <[email protected]>2016-07-06 17:47:42 +0200
commitd03daa940e87400b53bee9c065bac9dd0b1bbf41 (patch)
tree86d5321a30fbda86b548e325f80e55e880966f25
parentd3159246257fda50e908759c196db04e699bc475 (diff)
downloadcaja-d03daa940e87400b53bee9c065bac9dd0b1bbf41.tar.bz2
caja-d03daa940e87400b53bee9c065bac9dd0b1bbf41.tar.xz
GTK+-3 searchbar: use widget properties instead of GtkAlignment
-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);