straight into editing a new task name



Hi Planner-dev-list,
*Re-sent to the 'dev' list because it more relevant to 'dev'.*

I've used planner a bit, and I've found it useful: many thanks!

In my case, I found that I was wanting to create a new task and
immediately give it a name. However, the quickest method I could find to
do this (using keyboard shortcuts for maximum speed) was:

Ctrl-i   <- insert a new task
Enter    <- open the task dialog
Alt-n    <- focus on the name entry
"type name"
Enter    <- complete!

I have played with a few options to streamline this process - and I
would like to humbly propose the following enhancement to this workflow:

Ctrl-i   <- insert a new task
Enter    <- open the task dialog
"type name"
Enter    <- complete!

Attached is a patch I wrote (against 0.14.4) and tested to achieve this
enhancement. It alleviates the need to type 'Alt-n' by opening the task
property dialogue with focus on the Name entry when there is no existing
name. If there is an existing name then the behaviour reverts to
existing planner defaults.

So, in summary, the attached patch significantly reduces the effort to
rapidly enter plan tasks while minimising changes to the existing
behaviour. 


I welcome feedback and advice which would help this patch be accepted
into planner.
best regards,
Richard



-- 
Scanned by iCritical.
--- ./planner_orig/planner-0.14.4/src/planner-task-dialog.c	2008-07-22 14:41:47.000000000 +0100
+++ ./planner-0.14.5/src/planner-task-dialog.c	2010-01-19 14:15:53.473916357 +0000
@@ -2915,6 +2915,8 @@
 	GladeXML     *glade;
 	GtkWidget    *dialog;
 	GtkWidget    *w;
+	GtkWidget    *name_entry;
+	const gchar  *name_contents;
 	GtkSizeGroup *size_group;
 	MrpProject   *project;
 	MrpCalendar  *calendar;
@@ -3027,5 +3029,13 @@
 				 dialog,
 				 0);
 	
+	name_entry = glade_xml_get_widget (glade, "name_entry");
+	name_contents = gtk_entry_get_text (GTK_ENTRY (name_entry));
+	if (*name_contents == 0) {
+		/* if the task does not have a name, then 
+		 * give the `Name' GtkEntry focus. */
+		gtk_widget_grab_focus(name_entry);
+	}
+
 	return dialog;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]