[tasque] Clear "New Task..." text in inputfield on drag and drop (#566052)
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tasque] Clear "New Task..." text in inputfield on drag and drop (#566052)
- Date: Sat, 19 Sep 2009 13:58:43 +0000 (UTC)
commit 6af18ec80224321e9b7c2dda893073b489cd40f2
Author: Anirudh Sanjeev <anirudh anirudhsanjeev org>
Date: Sat Sep 19 06:56:07 2009 -0700
Clear "New Task..." text in inputfield on drag and drop (#566052)
Signed-off-by: Sandy Armstrong <sanfordarmstrong gmail com>
src/TaskWindow.cs | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/TaskWindow.cs b/src/TaskWindow.cs
index 8a378fa..26577a3 100644
--- a/src/TaskWindow.cs
+++ b/src/TaskWindow.cs
@@ -153,6 +153,7 @@ namespace Tasque
addTaskEntry.Activated += OnAddTaskEntryActivated;
addTaskEntry.FocusInEvent += OnAddTaskEntryFocused;
addTaskEntry.FocusOutEvent += OnAddTaskEntryUnfocused;
+ addTaskEntry.DragDataReceived += OnAddTaskEntryDragDataReceived;
addTaskEntry.Show ();
topHBox.PackStart (addTaskEntry, true, true, 0);
@@ -238,7 +239,6 @@ namespace Tasque
Application.Preferences.SettingChanged += OnSettingChanged;
}
-
void PopulateWindow()
{
// Add in the groups
@@ -925,6 +925,13 @@ namespace Tasque
OnAddTask (sender, args);
}
+ void OnAddTaskEntryDragDataReceived(object sender, DragDataReceivedArgs args)
+ {
+ // Change the text directly to the dropped text
+ addTaskEntry.Text = args.SelectionData.Text;
+ addTaskEntry.ModifyText (Gtk.StateType.Normal);
+ }
+
void OnAddTask (object sender, EventArgs args)
{
string enteredTaskText = addTaskEntry.Text.Trim ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]