summaryrefslogtreecommitdiff
path: root/src/searches/SavedSearchDialog.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:10:33 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:10:33 +0100
commit4a3f1fdfe1eb3743564adcee35d5513224339260 (patch)
tree1bcc97c9bd5abcf181b9f19294a0f187ff8af103 /src/searches/SavedSearchDialog.vala
parent7152401783578b56343f578b4ec920998660de33 (diff)
New upstream version 0.25.1upstream/0.25.1
Diffstat (limited to 'src/searches/SavedSearchDialog.vala')
-rw-r--r--src/searches/SavedSearchDialog.vala15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/searches/SavedSearchDialog.vala b/src/searches/SavedSearchDialog.vala
index 1716a26..5365cde 100644
--- a/src/searches/SavedSearchDialog.vala
+++ b/src/searches/SavedSearchDialog.vala
@@ -14,7 +14,6 @@ public class SavedSearchDialog {
private Gtk.ComboBoxText type_combo;
private Gtk.Box box;
- private Gtk.Alignment align;
private Gtk.Button remove_button;
private SearchCondition.SearchType[] search_types;
private Gee.HashMap<SearchCondition.SearchType, int> search_types_index;
@@ -51,13 +50,9 @@ public class SavedSearchDialog {
remove_button = new Gtk.Button.from_icon_name("list-remove-symbolic", Gtk.IconSize.BUTTON);
remove_button.button_press_event.connect(on_removed);
- align = new Gtk.Alignment(0,0,0,0);
-
box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 3);
box.pack_start(type_combo, false, false, 0);
- box.pack_start(align, false, false, 0);
- box.pack_start(new Gtk.Alignment(0,0,0,0), true, true, 0); // Fill space.
- box.pack_start(remove_button, false, false, 0);
+ box.pack_end(remove_button, false, false, 0);
box.show_all();
}
@@ -72,7 +67,7 @@ public class SavedSearchDialog {
private void set_type(SearchCondition.SearchType type) {
if (my_row != null)
- align.remove(my_row.get_widget());
+ box.remove(my_row.get_widget());
switch (type) {
case SearchCondition.SearchType.ANY_TEXT:
@@ -105,11 +100,10 @@ public class SavedSearchDialog {
break;
default:
- assert(false);
- break;
+ assert_not_reached ();
}
- align.add(my_row.get_widget());
+ box.pack_start (my_row.get_widget());
}
public SearchCondition.SearchType get_search_type() {
@@ -707,6 +701,7 @@ public class SavedSearchDialog {
dialog.set_default_response(Gtk.ResponseType.OK);
dialog.response.connect(on_response);
dialog.get_content_area().add(builder.get_object("criteria") as Gtk.Widget);
+ dialog.set_default_response (Gtk.ResponseType.OK);
add_criteria = builder.get_object("Add search button") as Gtk.Button;
add_criteria.button_press_event.connect(on_add_criteria);