[f-spot] Decouple `TagSelectionWidget' from `MainWindow'.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [f-spot] Decouple `TagSelectionWidget' from `MainWindow'.
- Date: Thu, 13 Aug 2009 20:25:40 +0000 (UTC)
commit 72d6d0255662e4804ea99c283f76e54ff57d2b9a
Author: Wojciech Dzierżanowski <wojciech dzierzanowski gmail com>
Date: Wed Aug 12 23:16:13 2009 +0200
Decouple `TagSelectionWidget' from `MainWindow'.
This reverts portions of 886e4150ee0484a0c0c42cc3cfb2a30db241776e.
Implementing the `RowActivated' handler for the main window's
`TagSelectionWidget' in the main window itself makes
`TagSelectionWidget' more reusable.
src/MainWindow.cs | 14 ++++++++------
src/TagSelectionWidget.cs | 5 -----
2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/MainWindow.cs b/src/MainWindow.cs
index af34b46..73b9293 100644
--- a/src/MainWindow.cs
+++ b/src/MainWindow.cs
@@ -359,6 +359,7 @@ public class MainWindow {
tag_selection_widget.KeyPressEvent += HandleTagSelectionKeyPress;
tag_selection_widget.ButtonPressEvent += HandleTagSelectionButtonPressEvent;
tag_selection_widget.PopupMenu += HandleTagSelectionPopupMenu;
+ tag_selection_widget.RowActivated += HandleTagSelectionRowActivated;
LoadPreference (Preferences.TAG_ICON_SIZE);
@@ -928,12 +929,6 @@ public class MainWindow {
query_widget.SetFolders (uri_list);
}
- public void AddTagsQuery (Tag [] tags)
- {
- ShowQueryWidget ();
- query_widget.Include (tags);
- }
-
public void RemoveTags (int [] nums, Tag [] tags)
{
foreach (int num in nums)
@@ -958,6 +953,13 @@ public class MainWindow {
args.RetVal = true;
}
+ void HandleTagSelectionRowActivated (object sender, RowActivatedArgs args)
+ {
+ ShowQueryWidget ();
+ query_widget.Include (new Tag [] {tag_selection_widget.TagByPath (args.Path)});
+ }
+
+
#if SHOW_CALENDAR
void HandleCalendarDaySelected (object sender, System.EventArgs args)
{
diff --git a/src/TagSelectionWidget.cs b/src/TagSelectionWidget.cs
index 4a89f5d..eb3dbac 100644
--- a/src/TagSelectionWidget.cs
+++ b/src/TagSelectionWidget.cs
@@ -759,11 +759,6 @@ namespace FSpot {
}
}
- protected override void OnRowActivated (Gtk.TreePath path, Gtk.TreeViewColumn column)
- {
- MainWindow.Toplevel.AddTagsQuery (new Tag [] {TagByPath (path)});
- }
-
#if TEST_TAG_SELECTION_WIDGET
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]