Hi! El sáb, 08-04-2006 a las 12:11 +0200, Richard Hult escribió: > Hi, > > Alvaro del Castillo skrev: > > Hi! > > >>> 2. Edit the task properties with a single right click > > This is a bit strange. We should have a right click menu with an edit > item in it, or just have the dialog brought up on double click, in my > opinion. > This is how the Gantt canvas graph works and yes, thinking a bit about it, when the user pushes the right button is expecting a contextual menu. It is a bit tricky to get the dialog at the right position in the canvas chart (not so hard because it is already done in the Gantt canvas) so I propose as a quick solution: - Change the edit dialog event so it is done not with the right button but with a double click. I have attached the patch with the change. It is small and works so tomorrow I will commit it if nobody finds some problem with it. Thanks Richard for your input. Cheers -- Alvaro > /Richard > -- http://acsblog.es
Index: src/planner-usage-row.c =================================================================== RCS file: /cvs/gnome/planner/src/planner-usage-row.c,v retrieving revision 1.2 diff -u -b -B -p -r1.2 planner-usage-row.c --- src/planner-usage-row.c 7 Apr 2006 11:16:15 -0000 1.2 +++ src/planner-usage-row.c 9 Apr 2006 19:21:29 -0000 @@ -3,6 +3,7 @@ * Copyright (C) 2003-2004 Imendio AB * Copyright (C) 2003 Benjamin BAYART <benjamin sitadelle com> * Copyright (C) 2003 Xavier Ordoquy <xordoquy wanadoo fr> + * Copyright (C) 2006 Alvaro del Castillo <acs barrapunto com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -1581,11 +1582,11 @@ usage_row_event (GnomeCanvasItem *item, row = PLANNER_USAGE_ROW (item); priv = row->priv; canvas_widget = GTK_WIDGET (item->canvas); + chart = g_object_get_data (G_OBJECT (item->canvas), "chart"); + tree = planner_usage_chart_get_view (chart); switch (event->type) { case GDK_BUTTON_PRESS: - chart = g_object_get_data (G_OBJECT (item->canvas), "chart"); - if (priv->assignment != NULL) { path = planner_usage_model_get_path_from_assignment (PLANNER_USAGE_MODEL (planner_usage_chart_get_model (chart)), @@ -1600,7 +1601,6 @@ usage_row_event (GnomeCanvasItem *item, break; } - tree = planner_usage_chart_get_view (chart); tree_view = GTK_TREE_VIEW (tree); selection = gtk_tree_view_get_selection (tree_view); @@ -1612,7 +1612,10 @@ usage_row_event (GnomeCanvasItem *item, gtk_tree_selection_select_path (selection, path); } - if (event->button.button == 3) { + break; + + case GDK_2BUTTON_PRESS: + if (event->button.button == 1) { if (priv->assignment != NULL) { planner_usage_tree_edit_task (tree); }
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente