[shotwell/wip/dedeprecate: 19/38] De-deprecate SavedSearchDialog
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/dedeprecate: 19/38] De-deprecate SavedSearchDialog
- Date: Wed, 2 Nov 2016 19:58:10 +0000 (UTC)
commit b6034ba1e36f78d184c96380b0d8ce696be0e1ee
Author: Jens Georg <mail jensge org>
Date: Fri Oct 21 17:43:39 2016 +0200
De-deprecate SavedSearchDialog
Signed-off-by: Jens Georg <mail jensge org>
src/searches/SavedSearchDialog.vala | 15 +++++----------
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]