Re: [Planner Dev] Fix for patch for the Link button patch against 0.11 CVS.





Attached is a new patch - this maintains the visual
orientation by using the ... mrp_task_get_position ()
to make sure that the order is maintained.

Can this be checked ? It works OK on my local copy in
that I now correctly see the links being applied
top-down.

I didn't know about mrp_task_get_position(task) but now
I do ;) Quite obvious now that I look at it !.

Rgds,
Lincoln.


lincoln phipps openmutual net wrote:



I did pkg-config --modversion gtk+  and got 1.2.10
Is that the right shell command to use ?.

Yes it looks like what I build ends up sorted
differently from what you build from CVS.

I get a clean compile and nothing is squeeking as
to wrong version so this anomaly needs to be corrected
in code.

Certainly Task1 -> Task2 ->Task3 is what we want by
default. We dont have a row-id ordinal of some kind to
verify the sort order and then choose to run up or down
the list i.e. some number that runs 1,2,3,4,5,6 based
on the position that the gantt is displayed but can we
compare GtkTreeIter.stamp ?

Rgds,
Lincoln

Richard Hult wrote:

mån 2004-02-16 klockan 15.21 skrev lincoln phipps openmutual net:

Richard,
    I just checked out the latest CVS copy (from anon so
I had to wait a bit as the CVS server was playing up and out
of sync), and the link button is around the wrong way from
how my original patch did it i.e. the expected link isn't
top-down visually but bottom up visually.

Attached is a patch to the current CVS to fix this orientation ;)



Hm? Here, CVS does the following:

Task 1
Task 2
Task 3

select all and link:

Task 1 -> Task 2 -> Task 3

Which should be the expected behavior I'm sure?

If that's not what you are seeing, there might be a difference in how
the selection is returned in different versions of GTK+ (I'm using
2.3.x) , and we might need to make sure that the list is sorted
according to the visual order.

/Richard

_______________________________________________
Planner-dev mailing list
Planner-dev lists imendio com
http://lists.imendio.com/mailman/listinfo/planner-dev

RCS file: /cvs/gnome/planner/src/planner-task-tree.c,v
retrieving revision 1.10
diff -u -b -B -p -r1.10 planner-task-tree.c
--- src/planner-task-tree.c	14 Feb 2004 02:21:21 -0000	1.10
+++ src/planner-task-tree.c	16 Feb 2004 23:30:38 -0000
@@ -2098,6 +2098,7 @@ planner_task_tree_link_tasks (PlannerTas
 
 		task = l->data;
 
+		if (mrp_task_get_position(target_task) > mrp_task_get_position(task)) {
 		if (!mrp_task_add_predecessor (target_task,
 					       task,
 					       relationship,
@@ -2112,6 +2113,23 @@ planner_task_tree_link_tasks (PlannerTas
 			gtk_widget_destroy (dialog);
 			g_error_free (error);
 		}
+		}
+		else { /* The other orientation: Different Gtk sort selections different */
+		if (!mrp_task_add_predecessor (task,
+						target_task,
+					       relationship,
+					       0,
+					       &error)) {
+			dialog = gtk_message_dialog_new (NULL,
+							 GTK_DIALOG_DESTROY_WITH_PARENT,
+							 GTK_MESSAGE_ERROR,
+							 GTK_BUTTONS_OK,
+							 "%s", error->message);
+			gtk_dialog_run (GTK_DIALOG (dialog));
+			gtk_widget_destroy (dialog);
+			g_error_free (error);
+			}
+		}
 		
 		target_task = task;
 	}


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