Re: working on



> > First of all and to learn a bit Planner, I worked to keep
> > the "Show Guide Lines" option checked from a work session to another
> > one. At present, you need to reselect this option every time you run
> > Planner.
> > But with the patch, it is saved in the Gantt view structure so you
> > needn't to reselect the option the next time you load your project.
> 
> Your patch looks good, and seems to work just fine.
> I'm curious as to why your patch removes the
> gantt_view_chart_scroll_event function??

It shouldn't, I made a mistake ! Please, glance at the new one !

> > * about the HTML exportation :
> > 	-- get internationalization for the html produced by the plugin
> > It's a bit tricky because xlst files are written with English words in
> > it for some labels like "Company", "Manager", "week"...
> > 
> > I thought about :
> > 		- adding a new set of translation files for this plugin but it
> > wouldn't be very "clean", also you would need to put the current
> > language information when you generate the XML.
> > 		- adding every word needed for presentation on the XML data, already
> > translated in the same way that every other word in the application.
> > Then you just have to get the translated word in the stylesheets instead
> > of writting it. I think it would be ok that way.
> > 		- any idea ? (generating at least parts of the xslt files ? not so
> > easy...)
> 
> If I undertand you correctly, we've had similar thoughts.
> I was thinking of creating
> entities for all of the words/phrases in the html output we'd need
> translated, put them in separate files by language (something like
> en.xml, es.xml, etc.), then teach Planner to pass the language to the
> stylesheet and the stylesheet to import the correct language file.

That's what I meant, indeed. 
However, I saw it has been done, using INTLTOOL and the existing
traductions, hasn't it ? (revision 821)
May you have something else in minds ?

> > 	-- don't put in the HTML information from the columns which are not in
> > "visible state" on the different views
> > (For example, if you don't want anyone to see the cost of your resources
> > for the project. )
> > 		- a simple way to make this would be to put blank information when
> > generating the XML where columns are set to be hide
> > 		- otherwise you would have to generate the presentation stylesheets
> > dynamically...
> 
> Hmmm - not being an HTML expert, how would that look?  Would the blank
> columns still show, or would they collapse so that they're essentially
> hidden?

I thought about not displaying them at all (like the "Note" column when
it's empty) ?

> > * also, have you thought about including PERT diagrams in Planner ?
> 
> There's an old bug entry on this:
> http://bugzilla.gnome.org/show_bug.cgi?id=130875
> 
> If its something you'd like to work on, that would be great!

I will consider it !

Marie
Index: src/planner-gantt-chart.c
===================================================================
--- src/planner-gantt-chart.c	(r�sion 833)
+++ src/planner-gantt-chart.c	(copie de travail)
@@ -55,6 +55,7 @@
 
 #define CRITICAL_PATH_KEY  "/views/gantt_view/highlight_critical_path"
 #define NOSTDDAYS_PATH_KEY "/views/gantt_view/display_nonstandard_days"
+#define GUIDELINES_PATH_KEY "/views/gantt_view/show_guidelines"
 
 
 typedef struct _TreeNode TreeNode; 
@@ -108,6 +109,9 @@
 	/* Nonstandard days visualization */
 	gboolean         nonstandard_days;
 
+	/* GuideLines . */
+	gboolean 		 guidelines;
+
 	/* Keep a list of signal connection ids, so we can remove them
 	 * easily.
 	 */
@@ -390,6 +394,12 @@
 							  NULL);
 	priv->nonstandard_days   = planner_conf_get_bool (NOSTDDAYS_PATH_KEY,
 							  NULL);
+	priv->guidelines = planner_conf_get_bool (GUIDELINES_PATH_KEY, NULL);
+
+	g_object_set (G_OBJECT(chart->priv->background),
+			"show_guidelines",
+			priv->guidelines,
+			NULL);
 }
 
 static void
@@ -1929,15 +1939,31 @@
 
 	priv = chart->priv;
 
+	if (priv->guidelines == state) {
+		return;
+	}
+
+	priv->guidelines = state;
+
 	g_object_set (G_OBJECT(chart->priv->background),
 		      "show_guidelines",
 		      state,
 		      NULL);
 
 	gtk_widget_queue_draw (GTK_WIDGET (priv->canvas));
+	
+	planner_conf_set_bool (GUIDELINES_PATH_KEY, state, NULL);
 }
 
 gboolean
+planner_gantt_chart_get_show_guidelines (PlannerGanttChart *chart)
+{
+	g_return_val_if_fail (PLANNER_IS_GANTT_CHART (chart), FALSE);
+
+	return chart->priv->guidelines;
+}
+
+gboolean
 planner_gantt_chart_get_highlight_critical_tasks (PlannerGanttChart *chart)
 {
 	g_return_val_if_fail (PLANNER_IS_GANTT_CHART (chart), FALSE);
Index: src/planner-gantt-chart.h
===================================================================
--- src/planner-gantt-chart.h	(r�sion 833)
+++ src/planner-gantt-chart.h	(copie de travail)
@@ -94,6 +94,9 @@
 planner_gantt_chart_set_show_guidelines			(PlannerGanttChart  *chart,
 							 gboolean       state);
 
+gboolean
+planner_gantt_chart_get_show_guidelines 		(PlannerGanttChart *chart);
+
 void
 planner_gantt_chart_set_nonstandard_days             (PlannerGanttChart *chart,
 							   gboolean           state);
Index: src/planner-gantt-view.c
===================================================================
--- src/planner-gantt-view.c	(r�sion 833)
+++ src/planner-gantt-view.c	(copie de travail)
@@ -255,7 +255,7 @@
 gantt_view_activate (PlannerView *view)
 {
 	PlannerGanttViewPriv *priv;
-	gboolean              show_critical, show_nostd_days;
+	gboolean              show_critical, show_nostd_days, show_guidelines;
 	gchar                *filename;
 
 	priv = PLANNER_GANTT_VIEW (view)->priv;
@@ -287,6 +287,9 @@
 	show_nostd_days = planner_gantt_chart_get_nonstandard_days (
 		PLANNER_GANTT_CHART (priv->gantt));
 
+	show_guidelines = planner_gantt_chart_get_show_guidelines (
+			PLANNER_GANTT_CHART (priv->gantt));
+
 	planner_task_tree_set_highlight_critical (PLANNER_TASK_TREE (priv->tree),
 						  show_critical);
 
@@ -301,6 +304,10 @@
 		GTK_TOGGLE_ACTION (gtk_action_group_get_action (priv->actions, "NonstandardDays")),
 		show_nostd_days);
 
+	gtk_toggle_action_set_active (
+		GTK_TOGGLE_ACTION (gtk_action_group_get_action (priv->actions, "ShowGuideLines")),
+		show_guidelines);
+
 	gantt_view_selection_changed_cb (PLANNER_TASK_TREE (priv->tree),
 					 PLANNER_GANTT_VIEW (view));
 	gantt_view_update_zoom_sensitivity (PLANNER_GANTT_VIEW (view));


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