[tomboy] Clean up wasted space in Search dialog based on input from Andreas and Kalle
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tomboy] Clean up wasted space in Search dialog based on input from Andreas and Kalle
- Date: Mon, 10 Aug 2009 18:47:48 +0000 (UTC)
commit 4503c77a69fc3584058dff70a838e7c4ca1d2948
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Wed Jul 8 14:29:59 2009 +0100
Clean up wasted space in Search dialog based on input from Andreas and Kalle
Of note, this change removes the case-sensitive search option.
Tomboy/RecentChanges.cs | 49 ++++++++++++++++++++--------------------------
1 files changed, 21 insertions(+), 28 deletions(-)
---
diff --git a/Tomboy/RecentChanges.cs b/Tomboy/RecentChanges.cs
index e7911ce..6803b41 100644
--- a/Tomboy/RecentChanges.cs
+++ b/Tomboy/RecentChanges.cs
@@ -12,7 +12,6 @@ namespace Tomboy
Gtk.MenuBar menu_bar;
Gtk.ComboBoxEntry find_combo;
Gtk.Button clear_search_button;
- Gtk.CheckButton case_sensitive;
Gtk.Statusbar status_bar;
Gtk.ScrolledWindow matches_window;
Gtk.HPaned hpaned;
@@ -88,10 +87,8 @@ namespace Tomboy
menu_bar = CreateMenuBar ();
- Gtk.Image image = new Gtk.Image (GuiUtils.GetIcon ("system-search", 48));
-
Gtk.Label label = new Gtk.Label (Catalog.GetString ("_Search:"));
- label.Xalign = 1;
+ label.Xalign = 0.0f;
find_combo = Gtk.ComboBoxEntry.NewText ();
label.MnemonicWidget = find_combo;
@@ -110,23 +107,24 @@ namespace Tomboy
clear_search_button.Clicked += ClearSearchClicked;
clear_search_button.Show ();
- case_sensitive =
- new Gtk.CheckButton (Catalog.GetString ("C_ase Sensitive"));
- case_sensitive.Toggled += OnCaseSensitiveToggled;
-
- Gtk.Table table = new Gtk.Table (2, 3, false);
- table.Attach (label, 0, 1, 0, 1, Gtk.AttachOptions.Shrink, 0, 0, 0);
- table.Attach (find_combo, 1, 2, 0, 1);
- table.Attach (case_sensitive, 1, 2, 1, 2);
+ Gtk.Table table = new Gtk.Table (1, 3, false);
+ table.Attach (label, 0, 1, 0, 1,
+ Gtk.AttachOptions.Fill,
+ Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
+ 0, 0);
+ table.Attach (find_combo, 1, 2, 0, 1,
+ Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
+ Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
+ 0, 0);
table.Attach (clear_search_button,
2, 3, 0, 1,
- Gtk.AttachOptions.Shrink, 0, 0, 0);
+ Gtk.AttachOptions.Fill,
+ Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
+ 0, 0);
table.ColumnSpacing = 4;
table.ShowAll ();
- Gtk.HBox hbox = new Gtk.HBox (false, 2);
- hbox.BorderWidth = 8;
- hbox.PackStart (image, false, false, 4);
+ Gtk.HBox hbox = new Gtk.HBox (false, 0);
hbox.PackStart (table, true, true, 0);
hbox.ShowAll ();
@@ -177,7 +175,7 @@ namespace Tomboy
Gtk.VBox vbox = new Gtk.VBox (false, 8);
vbox.BorderWidth = 6;
- vbox.PackStart (hbox, false, false, 0);
+ vbox.PackStart (hbox, false, false, 4);
vbox.PackStart (hpaned, true, true, 0);
vbox.PackStart (status_bar, false, false, 0);
vbox.Show ();
@@ -441,8 +439,7 @@ namespace Tomboy
tree.ScrollToPoint (0, 0);
return;
}
- if (!case_sensitive.Active)
- text = text.ToLower ();
+ text = text.ToLower ();
current_matches.Clear ();
@@ -452,7 +449,7 @@ namespace Tomboy
selected_notebook = null;
IDictionary<Note,int> results =
- search.SearchNotes(text, case_sensitive.Active, selected_notebook);
+ search.SearchNotes(text, false, selected_notebook);
foreach (Note note in results.Keys){
current_matches.Add(note.Uri, results[note]);
}
@@ -1135,14 +1132,10 @@ namespace Tomboy
bool repeat = false;
- if (case_sensitive.Active) {
- repeat = previous_searches.Contains (text);
- } else {
- string lower = text.ToLower();
- foreach (string prev in previous_searches) {
- if (prev.ToLower() == lower)
- repeat = true;
- }
+ string lower = text.ToLower();
+ foreach (string prev in previous_searches) {
+ if (prev.ToLower() == lower)
+ repeat = true;
}
if (!repeat) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]