Make search location buttons linked

This commit is contained in:
William Jon McCann 2012-07-31 16:21:53 +02:00
parent 349ccace89
commit 79233d227c

View file

@ -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