[nautilus] Make search location buttons linked



commit 79233d227cf7a3fbddb9965baf8a521265853f9c
Author: William Jon McCann <jmccann redhat com>
Date:   Tue Jul 31 16:21:53 2012 +0200

    Make search location buttons linked

 src/nautilus-query-editor.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index ad907b7..dd5583b 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -1028,6 +1028,7 @@ static void
 finish_first_line (NautilusQueryEditor *editor, GtkWidget *hbox, gboolean use_go)
 {
 	GtkWidget *button, *image;
+	GtkWidget *button_box;
 
 	button = gtk_button_new ();
 	gtk_style_context_add_class (gtk_widget_get_style_context (button),
@@ -1047,22 +1048,27 @@ finish_first_line (NautilusQueryEditor *editor, GtkWidget *hbox, gboolean use_go
 				     _("Add a new criterion to this search"));
 
 	editor->details->search_current_button = gtk_radio_button_new_with_label (NULL, _("Current"));
-	gtk_style_context_add_class (gtk_widget_get_style_context (editor->details->search_current_button),
-				     GTK_STYLE_CLASS_RAISED);
 	gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (editor->details->search_current_button), FALSE);
 	gtk_widget_show (editor->details->search_current_button);
 	editor->details->search_all_button = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (editor->details->search_current_button),
 											  _("All Files"));
-	gtk_style_context_add_class (gtk_widget_get_style_context (editor->details->search_all_button),
-				     GTK_STYLE_CLASS_RAISED);
 	gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (editor->details->search_all_button), FALSE);
 	gtk_widget_show (editor->details->search_all_button);
 	g_signal_connect (editor->details->search_all_button, "toggled",
 			  G_CALLBACK (on_all_button_toggled), editor);
 	g_signal_connect (editor->details->search_current_button, "toggled",
 			  G_CALLBACK (on_current_button_toggled), editor);
-	gtk_box_pack_start (GTK_BOX (hbox), editor->details->search_current_button, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (hbox), editor->details->search_all_button, FALSE, FALSE, 0);
+
+	button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+	gtk_widget_show (button_box);
+	gtk_box_pack_end (GTK_BOX (hbox), button_box, FALSE, FALSE, 0);
+	gtk_style_context_add_class (gtk_widget_get_style_context (button_box),
+				     GTK_STYLE_CLASS_LINKED);
+	gtk_style_context_add_class (gtk_widget_get_style_context (button_box),
+				     GTK_STYLE_CLASS_RAISED);
+
+	gtk_box_pack_start (GTK_BOX (button_box), editor->details->search_current_button, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (button_box), editor->details->search_all_button, FALSE, FALSE, 0);
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]