planner r884 - in trunk: . src
- From: mvdpot svn gnome org
- To: svn-commits-list gnome org
- Subject: planner r884 - in trunk: . src
- Date: Fri, 15 Feb 2008 22:25:39 +0000 (GMT)
Author: mvdpot
Date: Fri Feb 15 22:25:38 2008
New Revision: 884
URL: http://svn.gnome.org/viewvc/planner?rev=884&view=rev
Log:
2008-02-15 Maurice van der Pot <griffon26 kfk4ever com>
* src/planner-task-tree.c: (planner_task_tree_indent_task),
(planner_task_tree_unindent_task),
(planner_task_tree_move_task_up):
Keep selection as much as possible when indenting and unindenting.
Modified:
trunk/ChangeLog
trunk/src/planner-task-tree.c
Modified: trunk/src/planner-task-tree.c
==============================================================================
--- trunk/src/planner-task-tree.c (original)
+++ trunk/src/planner-task-tree.c Fri Feb 15 22:25:38 2008
@@ -3056,20 +3056,22 @@
}
}
- path = planner_gantt_model_get_path_from_task (PLANNER_GANTT_MODEL (model),
- indent_tasks->data);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
- gtk_tree_selection_select_path (selection, path);
- task_tree_unblock_selection_changed (tree);
+ gtk_tree_selection_unselect_all(selection);
+ for (l = indent_tasks; l; l = l->next) {
+ task = l->data;
- gtk_tree_path_free (path);
+ path = planner_gantt_model_get_path_from_task (model, task);
+ gtk_tree_selection_select_path (selection, path);
+ gtk_tree_path_free (path);
+ }
if (many) {
planner_cmd_manager_end_transaction (
planner_window_get_cmd_manager (priv->main_window));
}
+ task_tree_unblock_selection_changed (tree);
g_list_free (indent_tasks);
}
@@ -3156,20 +3158,22 @@
NULL);
}
- path = planner_gantt_model_get_path_from_task (PLANNER_GANTT_MODEL (model),
- unindent_tasks->data);
-
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
- gtk_tree_selection_select_path (selection, path);
- task_tree_unblock_selection_changed (tree);
+ gtk_tree_selection_unselect_all(selection);
+ for (l = unindent_tasks; l; l = l->next) {
+ task = l->data;
- gtk_tree_path_free (path);
+ path = planner_gantt_model_get_path_from_task (model, task);
+ gtk_tree_selection_select_path (selection, path);
+ gtk_tree_path_free (path);
+ }
if (many) {
planner_cmd_manager_end_transaction (
planner_window_get_cmd_manager (priv->main_window));
}
-
+
+ task_tree_unblock_selection_changed (tree);
g_list_free (unindent_tasks);
}
@@ -3290,9 +3294,8 @@
planner_window_get_cmd_manager (priv->main_window));
}
- g_list_free (list);
-
task_tree_unblock_selection_changed (tree);
+ g_list_free (list);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]