[gnome-panel] clock: Open evo with right date when clicking on calendar



commit b130f26195efba8a1c3f8bd40f34ed45563635b7
Author: Magnus E <koma lysator liu se>
Date:   Sat Feb 19 17:00:44 2011 +0100

    clock: Open evo with right date when clicking on calendar
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642603

 applets/clock/calendar-window.c |   23 ++---------------------
 1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
index cfd6fcc..396368e 100644
--- a/applets/clock/calendar-window.c
+++ b/applets/clock/calendar-window.c
@@ -1253,32 +1253,13 @@ calendar_day_activated (GtkCalendar    *calendar,
 	unsigned int  day;
 	unsigned int  month;
 	unsigned int  year;
-	time_t        date;
-	struct tm     utc_date_tm;
-	struct tm     local_date_tm = { 0, };
 	char         *argument;
 
 	gtk_calendar_get_date (calendar, &year, &month, &day);
 
-	local_date_tm.tm_mday  = (int) day;
-	local_date_tm.tm_mon   = (int) month;
-	local_date_tm.tm_year  = (int) year - 1900;
-	local_date_tm.tm_isdst = -1;
-
-	/* convert the local date picked in the calendar to broken-down UTC */
-	date = mktime (&local_date_tm);
-	gmtime_r (&date, &utc_date_tm);
-
-	/* FIXME: once bug 409200 is fixed, we'll have to make this hh:mm:ss
-	 * instead of hhmmss */
 	argument = g_strdup_printf ("calendar:///?startdate="
-				    "%.4d%.2d%.2dT%.2d%.2d%.2dZ",
-				    utc_date_tm.tm_year + 1900,
-				    utc_date_tm.tm_mon + 1,
-				    utc_date_tm.tm_mday,
-				    utc_date_tm.tm_hour,
-				    utc_date_tm.tm_min,
-				    0);
+				    "%.4d%.2d%.2d",
+				    year, month, day);
 
 	clock_launch_calendar_app (calwin, argument);
 



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