[geary] Use Gtk.SearchEntry: Closes bgno#713544
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Use Gtk.SearchEntry: Closes bgno#713544
- Date: Mon, 23 Dec 2013 22:24:07 +0000 (UTC)
commit 7da189bddcef94c07e9254826511a8ebba82a1bd
Author: Wolfgang Steitz <wolfer7 web de>
Date: Mon Dec 23 14:23:50 2013 -0800
Use Gtk.SearchEntry: Closes bgno#713544
src/client/components/main-toolbar.vala | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index ee350ee..20b10fe 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -15,7 +15,7 @@ public class MainToolbar : PillToolbar {
public string search_text { get { return search_entry.text; } }
private Gtk.ToolItem search_container = new Gtk.ToolItem();
- private Gtk.Entry search_entry = new Gtk.Entry();
+ private Gtk.SearchEntry search_entry = new Gtk.SearchEntry();
private Geary.ProgressMonitor? search_upgrade_progress_monitor = null;
private MonitoredProgressBar search_upgrade_progress_bar = new MonitoredProgressBar();
private Geary.Account? current_account = null;
@@ -72,13 +72,8 @@ public class MainToolbar : PillToolbar {
// Search bar.
search_entry.width_chars = 32;
- search_entry.primary_icon_name = "edit-find-symbolic";
- search_entry.secondary_icon_name = rtl ? "edit-clear-rtl-symbolic" : "edit-clear-symbolic";
- search_entry.secondary_icon_activatable = true;
- search_entry.secondary_icon_sensitive = true;
search_entry.tooltip_text = _("Search all mail in account for keywords (Ctrl+S)");
search_entry.changed.connect(on_search_entry_changed);
- search_entry.icon_release.connect(on_search_entry_icon_release);
search_entry.key_press_event.connect(on_search_key_press);
on_search_entry_changed(); // set initial state
search_entry.has_focus = true;
@@ -125,11 +120,6 @@ public class MainToolbar : PillToolbar {
(get_direction() == Gtk.TextDirection.RTL ? ICON_CLEAR_RTL_NAME : ICON_CLEAR_NAME) : null;
}
- private void on_search_entry_icon_release(Gtk.EntryIconPosition icon_pos, Gdk.Event event) {
- if (icon_pos == Gtk.EntryIconPosition.SECONDARY)
- search_entry.text = "";
- }
-
private bool on_search_key_press(Gdk.EventKey event) {
// Clear box if user hits escape.
if (Gdk.keyval_name(event.keyval) == "Escape")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]