[planner] Show date in status bar for resource usage view as well as Gantt view



commit 8f6325db4d5d80b1ef15b5cc58f7db36856ae044
Author: Caolan McNamara <caolanm redhat com>
Date:   Mon Jun 6 20:24:03 2011 +0200

    Show date in status bar for resource usage view as well as Gantt view

 src/planner-gantt-header.c |    2 +-
 src/planner-usage-chart.c  |   13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/planner-gantt-header.c b/src/planner-gantt-header.c
index 873ad11..5afcf94 100644
--- a/src/planner-gantt-header.c
+++ b/src/planner-gantt-header.c
@@ -668,7 +668,7 @@ gantt_header_motion_notify_event (GtkWidget	 *widget,
 	priv = header->priv;
 
 	t = floor ((priv->x1 + event->x) / priv->hscale + 0.5);
-	str = mrp_time_format (_("%e %b %Y"), t);
+	str = mrp_time_format (_("%a, %e %b %Y"), t);
 
 	if (!priv->date_hint || strcmp (str, priv->date_hint) != 0) {
 		g_signal_emit (widget, signals[DATE_HINT_CHANGED], 0, str);
diff --git a/src/planner-usage-chart.c b/src/planner-usage-chart.c
index ae6d143..e08f853 100644
--- a/src/planner-usage-chart.c
+++ b/src/planner-usage-chart.c
@@ -300,6 +300,14 @@ usage_chart_class_init (PlannerUsageChartClass * class)
 }
 
 static void
+usage_chart_header_date_hint_changed_cb (GtkWidget *header,
+					 gchar *hint,
+					 PlannerUsageChart *chart)
+{
+	planner_usage_chart_status_updated (chart, hint);
+}
+
+static void
 usage_chart_init (PlannerUsageChart * chart)
 {
 	PlannerUsageChartPriv *priv;
@@ -323,6 +331,11 @@ usage_chart_init (PlannerUsageChart * chart)
 				     "scale", SCALE (priv->zoom),
 				     "zoom", priv->zoom, NULL);
 
+	g_signal_connect (priv->header,
+			  "date_hint_changed",
+			  G_CALLBACK (usage_chart_header_date_hint_changed_cb),
+			  chart);
+
 	gtk_box_pack_start (GTK_BOX (chart), GTK_WIDGET (priv->header), FALSE,
 			    TRUE,
 			    0);



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